Controlling Geometry Node Representation

The Spatial and Routing Module provide a property that allows to you control the number of digits that represent geometry nodes returned in a web service response. By default, geometries are returned without placing a limit on the number of digits, which could be as many as 16 digits long. The extra digits add unnecessarily to the payload of a JSON or SOAP response, particular when large polygons or many records are returned. It also has the potential of setting an expectation of accuracy that is not in the data. The difference of one in the least significant digit might be a value of a billionth of a meter. For example, 3989657.014543291 and 3989657.014543292 differ by one billionth of a meter. Spatial data rarely has anything close to that accuracy. By setting the property to true, the values are trimmed typically to 9 or 10 significant digits. Using the previous example, the value would be returned as 3989657.01 which has an accuracy of a centimeter.

To trim the node values, add the following property to %Spectrum%\server\bin\wrapper\wrapper.conf and restart the server.

wrapper.java.additional.xx=-Dcom.pb.midev.service.output.geometry.useprecision=true

where xx is the number of the next available line in the section.

The coordinate values will be handled the same way for all geometries across services, whether for SOAP or REST calls, including services exposed from a data flow. This includes the Spatial Module's Feature Service, Mapping Service, Geometry Service, Map Tiling Service, WMS, WMTS, and WFS and the routing services.

Applications that are editing polygon data through the web services should not use this property if it is possible that by writing back trimmed geometries, small overlaps or gaps might be created with neighboring geometries.