AnsweredAssumed Answered

Prevent rounding of Coordinates

Question asked by BTLeslie on Oct 8, 2014
Latest reply on Oct 8, 2014 by Dan_Patterson

Working in lat long.  I'm doing a bit of code to get the bottom-left coord of a raster and then put a point in a shapefile at that location, however it appears that the lat/long coords are rounded to 3 decimal places when the shapefile is created - in the instance that I'm testing this means the point in the shapefile is offset by approx 2m which isn't good enough.  How can I prevent this rounding (it looks like I really want 13dp).

 

Here's my little bit of code:

 

#get coords
RasterLeft = arcpy.GetRasterProperties_management(myraster, "LEFT").getOutput(0)
RasterBottom = arcpy.GetRasterProperties_management(myraster, "BOTTOM").getOutput(0)

#create geometry
point = arcpy.Point()
point.X = RasterLeft
point.Y = RasterBottom

pointGeometry = arcpy.PointGeometry(point)

#copy geometry into shapefile
arcpy.CopyFeatures_management(pointGeometry, "test.shp")

Outcomes