How can I transform a polygon into a point?

1594
14
11-16-2017 02:24 PM
GB
by
New Contributor

Hi!

I have  a shapefile with polygons, but I want to transform these objects into points (example: I have the polygons with are the physical borders of a subset of school, I want to have point rather than the polygon of the building).

What can I use?

- feature to points doesn't suit me because it creates a new output, while I would like to keep the information I have in my original shapefile.

-I tried add geometry attributes, it runs successfully, but it doesn't not add the geometry attributes!!! Do you know why it happens?

Do you have other solutions?

Thank you!!

0 Kudos
14 Replies
DanPatterson_Retired
MVP Emeritus

You will need to produce a new output of some kind.  One of the easiest would be to calculate the X, Y (aka centroid) value for the center, then add it back in to the dataframe as an event layer saving to a point featureclass if you want

GB
by
New Contributor

Thank you. Do you know why the  add geometry attributesi is not woking? the tool runs successfully, but then in the table it doesn't add the geometry attributes!!! 

0 Kudos
DanPatterson_Retired
MVP Emeritus

show a screen grab of the table's first few rows.  There is a Shape field isn't there?.  There should be two new fields if you specified the centroid/center X and Y values

0 Kudos
GB
by
New Contributor

I followed Dan Petterson's tip, and in the original layer (polygons) I added to new fields, and then calculated the geometry (x coordinate of the centroids, y coordinate of the centroids). Now, I would like to visualize these points on the map, how can I do that? Probably you Dan had already explained that ("then add it back in to the dataframe as an event layer saving to a point featureclass if you want"), but can you please write the passages? Thank you.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Go to the File Menu, select Add Data, Add XY Data.... then specify the value for the X field (ie Longitude) and the Y field (Latitude).

Once you have the event layer, right-click on it and you can select Data, Export Data, then specify in the dialog whether you want it to go to a folder as a shapefile (don't forget the *.shp file extension) or put it into a geodatabase as a featureclass.

GB
by
New Contributor

Hi, I tried it (also before writing the post), but it seems to me I can only select a table when using the ADD XY data. I'm using ARCGIS 10.5. I am working with  a feature class containing polygons.

0 Kudos
DanPatterson_Retired
MVP Emeritus

you are effectively selecting the table of a featureclass... just makesure you are working with the table closed and the table of contents active.  It will use the table to produce the event layer if the table of contents is active.  Whatever you are doing, you are doing the same thing which is why it isn't working.  Add the table as and event layer, rightclick on that layer in the table of contents then export

0 Kudos
GB
by
New Contributor

I am sorry, but when I open add XY Data, I can only choose a table. The only way that I found to visualize the centroids was to go to data management tools, layers and table views, make xy event layers.  But in this way I crreate a new output, and that is something I do not want to obtain.

0 Kudos
DanPatterson_Retired
MVP Emeritus

The only way, through any method, that you can view the centroids of a polygon, is to create a new layer.

  1. I guess the word 'transform' can be interpreted differently.
  2. The 'keeping the attributes in the original shapefile' can definitely be accomplished using the process I have outlined
  3. features to points was definitely the wrong tool
  4. add geometry attributes is part of the 'event layer ' creation

So option 2.. using the 'event layer' creation work... once you have the event layer converted to a shapefile, you can simply toggle off the polygon layer and the visualization you desire will be complete, albeit with a new layer.

I guess this thread can be closed, although you don't like the answer