3

We have a SQL table view with point locations and are creating a query layer from it. However, the resulting points do not plot to the same location as the latitudes & longitudes in the table. In the screenshot below, the green points are from the Go to XY toolbar with the table coordinates pasted in, and the red points are what resulted in the query layer.

enter image description here

After investigating a bit, I'm pretty sure it's not a GCS mismatch (they are both in WGS84), and the best I can tell is that the query layer is rounding the coordinates to 6 digits. Here is a comparison of the coordinates in the original table (on the left), and coordinates from calculating the geometry of the query layer after exporting it to a feature class. The calculated fields are formatted to have 6+ decimal places, so it's not just the display, and these being the actual plotted coordinates are supported by the Identify tool after zooming in an extreme amount. enter image description here enter image description here

Everything seems to be rounded to exactly 6 digits (except for point 203 which only had 5 in the original table). Why is this happening, and how can we create the query layer with the same precision as the coordinates in the original table?

I have no idea what information is relevant to this question, but field type for the coordinates in the original table is Double. We tried manually assigning the spatial reference when we created the query layer, but didn't see any options for the X, Y fields themselves.

  • 1
  • Failure to register is likely a coordinate reference mismatch issue. The display width in an attribute table has only a tenuous relation to the actual underlying geometry values. Only when the coordinates are displayed as "18.10f" will you be able to determine what clipping to coordinate vales might be occurring. – Vince Mar 10 '18 at 2:41
4

The result of calculating geometry (X,Y coordinates) can be different depends on the type of the fields and the scale.

Let's assume that I have a table of XY coordinates of some points and convert it to shapefile (WGS84)

enter image description here

As we can see from the table above that our X,Y coordinates has 6 decimal places.

Now I will add a field with name x as float and I calculate X-coordinate using calculate geometry. I will get the result rounds to 4 digits.

enter image description here

Then I will add a new field with name x_exact and I will use for that Double with 6 scale value. then I will calculate the geometry x-coordinate and the result is the exact coordinate with the same number of digits as my original values.

enter image description here

Here, are the differences between the field's type in ArcGIS

If we plot both results (x,y and x_excat,y_exact) we can notice the difference when the map scale is 1:1000)

enter image description here

  • 1
    Thanks for the info. Unfortunately, it does not answer our question about the SQL view query layer. Creating the calculated geometry fields was just an investigative measure. Also, it seems I can’t add a pic to show it, but I created a shapefile with type of Double, 9 precision 5 scale and got the same results. To make extra sure that I wasn't messing up the field creation, I made another set of fields with the same parameters and just used the Field Calculator to pull in the values from the original fields, and they do look as they should. – user104307 Mar 12 '18 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.