Skip to content

Added Extent and OsmKey to Geocoding - #1278

Merged
karussell merged 1 commit into
graphhopper:masterfrom
boldtrn:issue_1221_osmKey
Feb 19, 2018
Merged

karussell merged 1 commit into
graphhopper:masterfrom
boldtrn:issue_1221_osmKey

Conversation

@boldtrn

@boldtrn boldtrn commented Jan 30, 2018

Copy link
Copy Markdown
Member

As mentioned by @devemux86 in #1221 the geocoding of the client-hc misses the osm key. While inspecting the Geocoding result I also saw that the extent was also missing, so I added that as well.

BTW: The extent is not documented in the API and I think the format is a bit weird (similar to Photon though). Should we add documentation about this feature in the API doc?

@karussell karussell added this to the 0.10 milestone Feb 6, 2018
@karussell

Copy link
Copy Markdown
Member

Is the extent also available through the geocoder-converter?

@boldtrn

boldtrn commented Feb 7, 2018

Copy link
Copy Markdown
Member Author

Is the extent also available through the geocoder-converter?

Not yet :).

Nominatim returns a boundingbox which seems similar to the extent.

boundingbox: [
"47.4780623",
"47.8175234",
"8.8593204",
"9.7538633",
],

OpenCageData returns bounds, which could be converted to the extent.

"bounds": {
        "northeast": {
          "lat": 48.1799218,
          "lng": 11.5961796
        },
        "southwest": {
          "lat": 48.1399218,
          "lng": 11.5561796
        }
      }

Should we open a ticket for the geocoding converter?

@karussell

Copy link
Copy Markdown
Member

Should we open a ticket for the geocoding converter?

Yes

return;
}
if (extent.length == 4) {
// Extend is in Left, Top, Right, Bottom; which is very uncommon, Photon uses the same

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has nothing to do with uncommon. There are many different orders - see bbox javadoc

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just seen that this is the "two points" format, but in a GeoJson style, which switches lat, lon. This is indeed similar to how GraphHopper formats the BBox in Geojson. Should I remove the comment?

@karussell
karussell merged commit b5ad072 into graphhopper:master Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants