-
Notifications
You must be signed in to change notification settings - Fork 104
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
Arcgis sink. Set geometry to null
when location is null
#2379
Comments
Entidad with Arrives to sink and is time=2024-06-07T06:34:33.455Z | lvl=DEBUG | corr=04bfb3fe-f99d-4e8f-8cf4-5aa44b20f487; cbnotif=1 | trans=cf1de6e9-c5e3-4b7e-a72b-45c25e291211 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=contextAttrToFeature | msg=com.telefonica.iot.cygnus.sinks.NGSIArcgisFeatureTableSink$NGSIArcgisAggregator[555] : [NGSIArcgisAggregator] aggregate - Atribute (name --> location, type --> geo:json, value --> null, metadata= ignored ) And is refused to invalid geo:json format: time=2024-06-07T06:34:33.455Z | lvl=DEBUG | corr=04bfb3fe-f99d-4e8f-8cf4-5aa44b20f487; cbnotif=1 | trans=cf1de6e9-c5e3-4b7e-a72b-45c25e291211 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=jsonElementToFeatureAttr | msg=com.telefonica.iot.cygnus.sinks.NGSIArcgisFeatureTableSink[579] : Proccessing attribute value: location --> null |
PR #2380 Pending on @danielvillalbamota validation before closing this issue. |
It works. I close the issue |
Problem
Arcgis sink is setting geometry to
{"x":0.0,"y":0.0,"spatialReference":{"wkid":4326}
when location hasnull
value.The following extract of traces show the case:
The POST query to Arcgis has the following BODY:
features=[{"geometry":{"x":0.0,"y":0.0,"spatialReference":{"wkid":4326}},"attributes":{"OBJECTID":5,"fiwareid":"W01","humedad_relativa":53,"nombre":"ESTACIÓN"}}]&f=json
Where the sink is setting "geometry" to
{"x":0.0,"y":0.0,"spatialReference":{"wkid":4326}}
instead of settingnull
value.Expected behavior
Arcgis sink should set "geometry" to
null
to avoid overwriting previous values in the geometry's feature or writing a non correct geometry for a feature that has no geometry.Following the previous example, the BODY of the query should be:
features=[{"geometry": null,"attributes":{"OBJECTID":5,"fiwareid":"W01","humedad_relativa":53,"nombre":"ESTACIÓN"}}]&f=json
The text was updated successfully, but these errors were encountered: