+ Reply to Thread
Results 1 to 3 of 3

Thread: Convert feature to wkt

  1. #1
    Benjamin Koehl
    Join Date
    May 2010
    Posts
    7
    Points
    3
    Answers Provided
    0


    0

    Default Convert feature to wkt

    Hey there,

    I have a feature inside a gdb.
    For another project I need this feature as WKT.
    Is there a solution for doing this with Python?

    ben

  2. #2
    Benjamin Koehl
    Join Date
    May 2010
    Posts
    7
    Points
    3
    Answers Provided
    0


    0

    Default Re: Convert feature to wkt

    I found an additional package for python called shapely.
    It looks as if it could be helpful.
    has anyone made any experiences with it?

    ben

  3. #3
    Bruce Harold

    Join Date
    Oct 2009
    Posts
    414
    Points
    75
    Answers Provided
    10


    0

    Default Re: Convert feature to wkt

    Hello Benjamin

    shapely together with the geojson module should get there for you. Why geojson?
    You can convert arcpy geometry objects to and from GeoJSON representations:

    >>> arcpy.PointGeometry(arcpy.Point(5,5)).__geo_interface__
    {'coordinates': (5.0001220703125, 5.0001220703125), 'type': 'Point'}

    >>> arcpy.AsShape({'coordinates': (5.0001220703125, 5.0001220703125), 'type': 'Point'})
    <PointGeometry object at 0x14599fd0[0x145c2560]>

    Regards
    Bruce H.
    ESRI Redlands

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts