lokkju opened a new issue #9970:
URL: https://github.com/apache/druid/issues/9970


   The geographic query documentation is unclear about the relation of 
latitude/longitude to horizontal/vertical and x/y coordinates for querying.
   
   ### Affected Version
   0.18.0 (all versions that support spatial queries?)
   
   ### Description
   In Geography: `longitude` is the horizontal dimension and `latitude` is the 
vertical dimension
   In Geometry: `x` is the horizontal dimension and `y` is the vertical 
dimension 
   For Polygons: `abscissa` is the horizontal dimension values and `ordinate` 
is the vertical dimension values
   
   The Geographic Query documentation page has an example that shows indexing 
dimensions being given as: `"dims": ["lat", "long"]`.
   
   The spatial filter documentation for `rectangular` and `radius` bounds 
specifies queries should provide coordinates as `[x, y, z, …]`
   
   This is confusing, and if followed to the letter, won't work as expected. 
Either I'm misunderstanding something, or else the person who wrote the 
documentation didn't understand the difference between geographic coordinate 
order vs geometric coordinate order.
   
   The same issues exists with `polygon` bounds, as providing the index 
dimensions as in the example will require the `abscissa` to contain latitude 
(vertical) values.
   
   The correct fix would be to specify your index dimensions as 
`["long","lat"]`, but that could be very confusion for anyone who has already 
been using spatial queries. An alternative is to enshrine the `["lat", "long"]` 
ordering by specifying that spatial bounds should provide coordinates in 
["lat", "long"]`  order.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to