Select to view content in your preferred language

How to Visualize a polygon coordinate in ArcMap

4023
3
07-12-2015 12:56 PM
IgnatiusRumambi
Emerging Contributor

Dear people,

I am a beginner in arcgis, I have problems to an Excel file with a coordinate information (These are the coordinates of a few polygons, see Appendix), how can I visualize these coordinates in ArcMap as a shapefile?,

Is there somebody help me to solve this ?, thx a lot .....

regards, Lion@g

0 Kudos
3 Replies
ChrisSmith7
Honored Contributor

Ignatius,

Your questioned is marked as "assumed answered" - were you able to figure out a method? If not, I have a suggestion... It looks like each record contains a coordinate pair (longitude, latitude in your case) array - WGS coordinates landing somewhere in the Netherlands, if I'm correct.

Since you are posting in the Python forum, here's a script that would help to read the linear coordinates:

help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000001v000000

Note - you'll have to copy the link above... the Geonet forum seems to be routing it to the main help page...

You would need to do some formatting to make it look like the example - just remember... latitude = y; longitude = x.

Let me know if this helps!

XanderBakker
Esri Esteemed Contributor

The format you have in column G (COORD) is the WKT format. You can convert these coordinates pretty easy using arcpy (I have truncated the coordinates for readability):

def main():
    import arcpy
    lst = ['POLYGON((4.862563 52.429738,4.862689 52.429747, etc))',
          'MULTIPOLYGON(((4.949747 52.295639,4.949747 52.295551, etc)))',
          'MULTIPOLYGON(((4.875532 52.40248,4.846486 52.385999, etc)))',
          'MULTIPOLYGON(((4.887551 52.406914,4.887522 52.406819, etc)))',
          'MULTIPOLYGON(((4.913632 52.324501,4.912419 52.324293, etc)))',
          'POLYGON((5.017926 52.31812,5.008508 52.320116, etc))',
          'POLYGON((5.009507 52.302302,5.009488 52.302189, etc))',
          'MULTIPOLYGON(((4.977376 52.379963,4.97689 52.37982, etc)))',
          'MULTIPOLYGON(((4.979968 52.369252,4.979748 52.368883, etc)))']

    res = []
    for p in lst:
        polygon = arcpy.FromWKT(p)
        res.append(polygon)

    fc_out = r"C:\Forum\WKT\test01.shp"
    arcpy.CopyFeatures_management(res, fc_out)

if __name__ == '__main__':
    main()

This code just converts the polygons, no attributes are taken over to the shapefile.

After this I run the repair geometry (due to the incorrect order of the coordinates in the rings) and set the coordinate system to WGS1984.

Find attached the shapefile with the (multi)polygons (including a shapefile using RD_New coords).

IgnatiusRumambi
Emerging Contributor

Hi Rebecca,First I want to thank you for your response Regarding my question "how to vizualize a polygon coordinates in ArcMap" ..My apologies for the late response, at this moment I do not have the opportunity to work with arcgis, hopefully I can work again a.s.a.p.Thank you again here, I appreciate your help very much,greetings,Liong Rumambi

0 Kudos