1

I have a shapefile and y want to transform the attribute table (image 1) in other table (image 2) but I only want to get some fields and values.

From the atribute table I want to transform FID_malla field as rows and the GROUP fields values as a columns in unique values. Then the table values are filled with Shape_Area field values.

I use R language to do it but, there is any tool in ArcGIS to do that? or I have to do it using ArcPY (UpdateCursor)?

(image 1)

enter image description here

(image 2)

enter image description here

2

You'll want to use the Pivot Table tool.

Your input field will be FID_malla. Your pivot field will be GROUP, and your value field will be SHAPE_Area.

enter image description here

enter image description here

enter image description here

1

The SQL tools in ArcGIS are not exactly first class and can take a while to find - I can't think of one off the top of my head for that. You could try the dissolve tool as another angle or maybe you can use the underlying database if it is on SDE.

Another option is to use a QGIS Virtual Layer, which is quite an impressive innovation. If you know how to write SQL, you could write something like

select sum(x), sum(y) from my_table group by "GROUP"

giving you quite a lot of flexibility. That's why I tend to prefer raw DBMS systems, or GIS software that interfaces with them well, as they provide a significant amount more power than ArcGIS in general, although at the expense of some complexity.

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.