Skip to content

How to fetch Latitude and Longitude co-ordinates from osmGeo object while filtering #139

@sivanand82

Description

@sivanand82

Hi Team,

I have been using the OSM library for fetching results for range of range co-ordinates. The library works well though but the unable to fetch latitude and longitude co-ordinates from the filter query.

var lastfiltered = from osmGeo in source
where osmGeo.Type == OsmSharp.OsmGeoType.Node &&

                                // where osmGeo.Type != OsmSharp.OsmGeoType.Relation &&
                                osmGeo.Tags != null
                                && osmGeo.Tags.Contains(t)
                                   select osmGeo;

var complete = filtered.ToComplete();

The osmGeo abstract class does not have a defnition of longtitudes and latitudes.How to resolve this

public abstract class OsmGeo
{
protected OsmGeo();

    public long? Id { get; set; }
    public OsmGeoType Type { get; protected set; }
    public TagsCollectionBase Tags { get; set; }
    public long? ChangeSetId { get; set; }
    public bool? Visible { get; set; }
    public DateTime? TimeStamp { get; set; }
    public int? Version { get; set; }
    public long? UserId { get; set; }
    public string UserName { get; set; }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions