Tag Info

Hot answers tagged

2

I suspect the issue is the GDAL 1.11 bindings you're fetching from gohlke do not match the internal GDAL inside of Arc*. Your bindings need to be compiled against ESRI's GDAL to work reliably. It's possible they can be made to work, but it is going to be a lot of headache. In short, ESRI needs to provide the gdal_i.lib stub file that GDAL generates as part ...


2

A MultiLineString is a list of lines: from shapely.geometry import MultiLineString, mapping, shape coords = [((0, 0), (1, 1)), ((-1, 0), (1, 0))] lines = MultiLineString(coords) print lines MULTILINESTRING ((0 0, 1 1), (-1 0, 1 0)) for line in lines: print line LINESTRING (0 0, 1 1) LINESTRING (-1 0, 1 0) # convert to GeoJSON format: print ...


1

The easiest solution is to use union, cascaded_unionor unary_union. All the lines are split at the points of intersection: from shapely.geometry import LineString line1 = LineString([(0, 0), (2, 2),(3,1)]) line2 = LineString([(2, 0), (2, 1),(1,2)]) print line1.intersection(line2) POINT (1.5 1.5) for line in line1.union(line2): print line LINESTRING (0 ...


1

Gdal PYthon binding works with conjuration with gdal. You need to have installed GDAL along with the binding to work. A quick skim over the errors you provided they suggest that while you installed gdal-python you haven't install the gdal by itself: A possible solution chain is: Install GDAL (http://www.gisinternals.com/sdk/) Append the installation ...


1

Manage to solve my problem. THis can be done by instantiating OGR and openup a shapefile database, layers etc Afterwhich, create a OGRPoint object with the neccessary lat lon input OGRPoint* pt = new OGRPoint(lat, lon); set a spatial filter based on this point object on the layer next extract the feature based on the filter resu;lt Finally extract the ...



Only top voted, non community-wiki answers of a minimum length are eligible