Assuming that your coordinates are in metres then anything beyond the 2nd or 3rd decimal digit is imaginary noise/ a measurement artefact. No surveying methodology gives you millimetre accuracy on a reliable basis so you should round all of the coordinates to the nearest metre for realism but the nearest cm if you are optimistic.

Ian

On Thu, 6 Aug, 2015 at 7:18 AM, sunish <sunish.ku...@gmail.com> wrote:
Hello,

I have a the following kind of geometry in shape file.

POLYGON ((930363.007438882021233 1030324.872869260027073,930363.03660056903027 1030326.127382730017416,930367.170734492014162 1030345.227967930026352,930368.587681315955706 1030388.428108309977688,930369.394112769048661 1030398.673333609942347,930375.114355825004168 1030405.972964919987135,930397.797733561019413 1030394.860528319957666,930416.918734838953242 1030390.429355990025215,930417.958387276041321 1030359.943235749960877,930420.074469789979048 1030351.603456250042655,930401.197538555017672 1030344.308112310012802,930363.007438882021233 1030324.872869260027073))

When I read it with Geotools the coordinates are getting rounded off like this: POLYGON ((930363.007438882 1030324.87286926, 930363.036600569 1030326.12738273, 930367.170734492 1030345.22796793, 930368.587681316 1030388.42810831, 930369.394112769 1030398.67333361, 930375.114355825 1030405.97296492, 930397.797733561 1030394.86052832, 930416.918734839 1030390.42935599, 930417.958387276 1030359.94323575, 930420.07446979 1030351.60345625, 930401.197538555 1030344.30811231, 930363.007438882 1030324.87286926))

I was trying to transfer the geometries to Postgis and noticed the issue. Is there any way to keep more accurate coordinate values? I referred JTS and I think this is the maximum precision possible with Java Double.
Thank you,

Sunish.



------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to