Skip to content
New issue

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

geo:json Mulitpoint, MultilineString, Multipolygon non documented #3586

Closed
gboege opened this issue Jan 7, 2020 · 7 comments
Closed

geo:json Mulitpoint, MultilineString, Multipolygon non documented #3586

gboege opened this issue Jan 7, 2020 · 7 comments
Labels
Milestone

Comments

@gboege
Copy link

gboege commented Jan 7, 2020

Hi

I have just found out, that there are more geo:json options available than documented.
They are implemented and in the tests, but not in the docu.
Multipoint
Multilinestring
Mulitpolygon

I guess, this opens up new options and usecases.

@fgalan
Copy link
Member

fgalan commented Jan 7, 2020

To which documentation do you refer? Could you provide the precise link, please? Thanks!

@gboege
Copy link
Author

gboege commented Jan 7, 2020

I have to correct myself a bit, it is not non documented. Sorry for this unprecise statement, maybe this could be a bit extended to explicitely mention those 3. I did searches for all 3 terms with fiware and no results.

https://fiware-orion.readthedocs.io/en/1.2.1/user/geolocation/index.html
No mentioning at all.

http://telefonicaid.github.io/fiware-orion/api/v2/stable/
"GeoJSON. GeoJSON is a geospatial data interchange format based on the JavaScript Object Notation (JSON). GeoJSON provides greater flexibility allowing the representation of point altitudes or even more complex geospatial shapes, for instance multi geometries."
-> I misunderstood multi geometries as Polygon, did not recognise that the 3 above Geometries are existing and covered. My fault, sorry.

Maybe adding a list of Geojson geometries might be helpful, especially when not all Geojson is covered (as far as I know: Features and FeatureCollection).

@fgalan
Copy link
Member

fgalan commented Jan 13, 2020

I have to correct myself a bit, it is not non documented. Sorry for this unprecise statement, maybe this could be a bit extended to explicitely mention those 3. I did searches for all 3 terms with fiware and no results.

https://fiware-orion.readthedocs.io/en/1.2.1/user/geolocation/index.html
No mentioning at all.

(1.2.1 is a pretty old version, I'd recommend to use https://fiware-orion.readthedocs.io/en/master/user/geolocation/index.html or https://fiware-orion.readthedocs.io/en/2.3.0/user/geolocation/index.html)

Both topics (entity location and geographical queries) are dealt in detail in the "Geospacial properties of entities" and "Geographical Queries" sections of the NGSIv2 specification.

with actually is a link to the second link you cite, i.e. http://telefonicaid.github.io/fiware-orion/api/v2/stable

http://telefonicaid.github.io/fiware-orion/api/v2/stable/
"GeoJSON. GeoJSON is a geospatial data interchange format based on the JavaScript Object Notation (JSON). GeoJSON provides greater flexibility allowing the representation of point altitudes or even more complex geospatial shapes, for instance multi geometries."
-> I misunderstood multi geometries as Polygon, did not recognise that the 3 above Geometries are existing and covered. My fault, sorry.

Maybe adding a list of Geojson geometries might be helpful, especially when not all Geojson is covered (as far as I know: Features and FeatureCollection).

NGSIv2 intentionally doesn't provide extra info regarding which GeoJSON are supported in each particular implementation because that is something up to the implementation. In the case of Orion, the GeoJson capabilities are at the end the onese in the underlaying MongoDB database. Mabye some information regarding this information could be added to the "implementation notes" at http://fiware.github.io/specifications/ngsiv2/stable/

To be fully sure, could you tell how do have tested the non-working case of Features and Features Collection? Could you provide a curl or similar to reproduce your test, please?

Thanks!

@gboege
Copy link
Author

gboege commented Jan 14, 2020

I do understand that it is not mentioned in the NGSI-Standard, but I agree to better put it in the implementation notes, because it is not the full GeoJson standard implemented:

The following GeoJson Positions (as described in the table of index here are enclosed in the Orion-Tests (Link) and could be replicated by me:
geo:json Point
geo:json MultiPoint
geo:json LineString
geo:json MultiLineString
geo:json Polygon
geo:json MultiPolygon

OK: Point
curl -X "POST" "http://xx.xx.xx.xx:1026/v2/entities"
-H 'Content-Type: application/json'
-H 'Fiware-Service: /'
-H 'Fiware-servicepath: /'
-d $'{
"type": "Testtype",
"id": "Testentity",
"location": {
"type": "geo:json",
"value": {
"type": "Point",
"coordinates": [
0,
0
]
},
"metadata": {
"crs": {
"value": "WGS84"
}
}
}
}'

Not OK: Feature - Database Error &#40:
curl -X "POST" "http://xx.xx.xx.xx:1026/v2/entities"
-H 'Content-Type: application/json'
-H 'Fiware-Service: /'
-H 'Fiware-servicepath: /'
-d $'{
"type": "Testtype",
"id": "Testentity",
"location": {
"type": "geo:json",
"value": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0,
0
]
},
"properties": {
"name": "null island"
}
},
"metadata": {
"crs": {
"value": "WGS84"
}
}
}
}'

Not OK: GeometryCollection - Database Error &#40:
curl -X "POST" "http://xx.xx.xx.xx:1026/v2/entities"
-H 'Content-Type: application/json'
-H 'Fiware-Service: /'
-H 'Fiware-servicepath: /'
-d $'{
"type": "Testtype",
"id": "Testentity",
"location": {
"type": "geo:json",
"value": {
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
0,
0
]
},
{
"type": "LineString",
"coordinates": [
[
0,
0
],
[
1,
0
]
]
}
]
},
"properties": {
"name": "null island"
}
},
"metadata": {
"crs": {
"value": "WGS84"
}
}
}
}'

Not OK: FeatureCollection - Database Error &#40:
curl -X "POST" "http://xx.xx.xx.xx:1026/v2/entities"
-H 'Content-Type: application/json'
-H 'Fiware-Service: /'
-H 'Fiware-servicepath: /'
-d $'{
"type": "Testtype",
"id": "Testentity",
"location": {
"type": "geo:json",
"value": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
0,
0
]
},
"properties": {
"name": "null island"
}
}
]
},
"metadata": {
"crs": {
"value": "WGS84"
}
}
}
}'

@fgalan
Copy link
Member

fgalan commented Jan 14, 2020

Thanks for the feedback! Based on it I have done the following PR modifying documentation: #3587. It would be great if you could have a look to it, please.

Thanks!

@fgalan fgalan added this to the 2.4.0 milestone Jan 14, 2020
@fgalan fgalan added the doc label Jan 14, 2020
@fgalan
Copy link
Member

fgalan commented Jan 14, 2020

Taking into account PR #3587, I think this issue can be closed. Do you agree, @gboege ?

@gboege
Copy link
Author

gboege commented Jan 14, 2020

We updated the Orion CB docs with details. Issue closed

@gboege gboege closed this as completed Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants