1
vote
1answer
26 views

Convert WKT (or geojson) geometry to numpy array of coordinates

I am looking for the fastest way to convert WKT or geojson geometry from string to numpy array of coordinates. Is it possible to do it strictly in Python and without creating geometry object such ...
1
vote
1answer
72 views

Shapely WKT precision/rounding

I'm using Shapely's wkt.dumps function to get WKT from geometry objects. I can't seem to find a way to limit the precision of the coordinates. Any help is appreciated.
6
votes
4answers
2k views

How to convert geometry to WKT using ArcPy?

I would like to be able to convert a single feature (or potentially many features) in an ArcGIS layer into Well Known Text (WKT) format during a geoprocessing operation using Python and ArcPy (no ...
7
votes
2answers
915 views

Converting KML files for use with Python library Shapely

I am trying to get a KML-file (wijken.kml) into Shapely. The KML-file is validated against the proper XML schema, so I guess the input is correct. Routes I have tried: 1) Converting to WKT or WKB ...
3
votes
1answer
196 views

Problem with precision when convert from WKT to shapefile

I have a problem with converting from WKT to shapefile in pygdal. In wkt I have fields with precision (for example real 7.2). When I create a shapefile I have field numeric with no precision (numeric ...
7
votes
1answer
1k views

Help with PostGIS polygon geometry - non-closed rings

I've picked up a copy of the super-wicked book 'Python Geospatial Development' by Erik Westra (Amazon link), and I'm working through it. Currently, it's teaching me to load GSHHS coastline data from a ...
11
votes
3answers
2k views

Looking for a pythonic way to calculate the length of a WKT linestring

I was quite unsatisfied with Calculating Length of Linestrings in WGS84 in Miles. It kept me wondering if there is a more convenient, Pythonic way to calculate the length of a WKT linestring according ...