Soontao / odata-v4-parser

OData(V4) URI Parser
MIT License
17 stars 4 forks source link

geography[BUG] #272

Closed Mario-35 closed 2 years ago

Mario-35 commented 2 years ago

Hi and thanks for this library

?$filter=geo.distance(location,geography'POINT(-1.702 48.113)') le 200

it case a bug.

Soontao commented 2 years ago

sure, let me have a look

Soontao commented 2 years ago

Hi @Mario-35,

Thanks your report, and your ID is really cute haha :)

image

in odata official APNF standard, the Point literal should have SRID literal as prefix, and the Point literal is not uppercase, but there are many variants in odata.org documents, so its confused.

I released a new version 0.2.12, its supported uppercase POINT literal and geography literal without SRID, but carefully use them on your risk, maybe its not compatible with other implementations

Mario-35 commented 2 years ago

Thanks I go to test and report it.

It's my real name :)

Mario-35 commented 2 years ago

Ok, it works I searched but don't saw it was an uppercase problem :) I use your library for sensorThings Odata and you're right, it's confused BUT in fact, I think it's POSTGRES (POSGIS) which have some problems with lowercase and uppercase name, so to avoid these library problems transform all in uppercase.

sorry for my approximative english.

Thanks