We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At the moment Iam doing this in seperate functions but is it possible to do something simulair to te code below?
// Constants.TagStreet => "addr:street"; // Constants.TagPostalCode => "addr:postcode"; // Constants.TagHighway => "highway"; // Constants.TagName => "name"; OsmHelper.Download(Constants.Url, Constants.File); using var fileStream = File.OpenRead(Constants.File); var source = new PBFOsmStreamSource(fileStream); var results = new List<Address>(); foreach (var address in addresses) { var final = from osmAddresses in source where osmAddresses.Type == OsmGeoType.Node && osmAddresses.Tags != null && osmAddresses.Tags.ContainsKey(Constants.TagStreet) && osmAddresses.Tags.Contains(Constants.TagPostalCode, address.Zip.NormalizeZip()) join osmWays in source on osmAddresses equals osmWays where osmWays.Type == OsmGeoType.Way && osmWays.Tags != null && osmWays.Tags.Contains(Constants.TagName, osmAddresses.Tags[Constants.TagStreet]) && osmWays.Tags.ContainsKey(Constants.TagHighway) select new Address { Street = osmAddresses.Tags[Constants.TagStreet], Zip = osmAddresses.Tags[Constants.TagPostalCode], GeoLocation = new GeoLocation { Longitude = ((Node)osmAddresses).Longitude, Latitude = ((Node)osmAddresses).Latitude }, Nodes = ((Way)osmWays).Nodes.ToList() }; results.AddRange(final); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At the moment Iam doing this in seperate functions but is it possible to do something simulair to te code below?
The text was updated successfully, but these errors were encountered: