POST
|
How can I alter the aliases of the required fields (ObjectID, Shape, Shape_Length, Shape_Area) in a GDB with Python? For example I have this code: #!/usr/bin/python # -*- coding: utf-8 -*- rf = ur'D:\Δοκιμές\Tester' gdb = rf+'\\Ant.gdb' p = ['Parcels','Parts'] for a in range(2): RFields = OrderedDict([(arcpy.Describe(gdb+'\\'+p).OIDFieldName,u'Α/Α'),(u'Shape',u'Γεωμετρία'),(arcpy.Describe(gdb+'\\'+p).lengthFieldName,u'Περίμετρος'),(arcpy.Describe(gdb+'\\'+p).AreaFieldName,u'Εμβαδόν')]) for key in RFields.keys(): arcpy.AlterField_management(gdb+'\\'+p,key,key,RFields[key]) But it produces an error. Is it possible to do what I want?
... View more
03-24-2017
06:31 AM
|
0
|
0
|
532
|
POST
|
I also calculated in more than one PCs (5 to be exact) and the problem remains.
... View more
05-20-2016
03:41 AM
|
0
|
1
|
783
|
POST
|
I don't think I am pedantic. If the produced shapefiles cannot pass the quality testing of our clients, we won't get paid. In order to avoid this, I will have to explain why this is happening. The options are two: Wait ESRI to fix it. Wait ESRI documented in detail, so that I can support the result. P.S.: Some differences are 0.0000001m 2 that equals to 0,1mm 2
... View more
05-20-2016
03:39 AM
|
0
|
0
|
1301
|
POST
|
You are correct. In real world, on the field of environmental and landuse surfaces, differences in area less than 1 square millimeter are negligible. On the other hand, the fact that there is a difference is a problem. When you calculate areas on the same polygons, on the same format (shapefile) and with the same program, the results must be the same. At the same time, which of the two areas is the correct one, as long as they can't be both? And when I have more than 100 shapefiles to calculate the area, I expected to be able to simulate the Calculate Geometry tool with the Calculate Field tool and the command !shape.area!. Apparently, what I was expecting was not the case, and I will have to make the calculation manually but I think it should be documented by ESRI that the two algorithms are different and produce slightly different results.
... View more
05-20-2016
01:44 AM
|
0
|
5
|
1301
|
POST
|
Thanks for your replies but.... As you can see on the following screanshot there errors and they are visible and countable. Also if you try to Select by attributes with AREA1 <> AREA2, all polygons are selected. And with ArcCatalog, on the view of the table, it uses the default size for decimals (6 digits), that's why you see only zeros. As you can see there are a few polygons that have 0,000000000 as difference. I assume that the difference is even smaller (probably 0,0000000001). If you change the number format of the DIFF field in scientific, you will see the exact difference, as follows: The main question for this is WHY is it happening? When we use Python programming, we want to automate the EXACT actions we do by hand. If the Calculate Geometry tool, uses a different algorithm to calculate the area of a polygon related to the Pythonic syntax !shape.area!, then the least ESRI should do is to document it and explain WHY it happens. The second step for all this would be to solve this problem.
... View more
05-19-2016
10:26 PM
|
0
|
1
|
1301
|
POST
|
Well I had a small change on the parameters of the question. First the problematic polygons are 31. The differences are on the 7th decimal (aka 0,0000001). I know that this difference is quite small but the quality tests of the project that I work on does not want this kind of differences. I also noticed that the calculation for AREA2 lasts from 3 to 4 times more than AREA1. I attached the 31 polygons that have the difference, as requested. https://onedrive.live.com/redir?resid=AF5E4C8DEC50543E!457058&authkey=!AEIBlooHmQ1Fu-o&ithint=file%2czip
... View more
05-19-2016
02:00 PM
|
0
|
4
|
1301
|
POST
|
The check geometry found no errors but I run Repair Geometry. The dataframe in on the same coordinate system. The difference remains!
... View more
05-19-2016
05:12 AM
|
0
|
1
|
1616
|
POST
|
The shapefile has a coordinate system defined (Greek Grid). I tried yesterday after publishing my question to calculate with and without defined Projection and the result was the same.
... View more
05-18-2016
11:07 PM
|
0
|
3
|
1615
|
POST
|
I have a shapefile with 62.000 polygons. I have created two fields (Double) AREA1 and AREA2 with identical properties. On AREA1 I have calculated the area of polygons with Calculate Geometry > area process. On AREA2 I have calculated the area of polygons with Field calculator and the command: !shape.area! When I compare the difference between the two fields ([AREA1] - [AREA2]), I find 30 polygons with no zero difference less than 0,01 square meters. Is there a different algorithm for these processes? Does anyone know why is this happening?
... View more
05-18-2016
05:46 AM
|
2
|
35
|
21457
|