Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 77230

ogr2ogr is an open source command line utility popular for converting to and from various vector spatial data formats.

1 vote

How to create one buffer around all the points using ogr2ogr?

. $ ogr2ogr houses.buf.csv a1.houses.csv \ -lco GEOMETRY=AS_WKT -dialect SQLITE -sql \ "SELECT ST_Buffer(ST_Union(GEOMETRY),.001,1) AS WKT, 1 AS Name FROM 'a1.houses'" $ ogr2ogr houses.buf.kml houses.buf.csv …
Dan Jacobson's user avatar
0 votes

Gdal Ogr2Ogr Split polygon shapefile by line shapefile

understand the ST_Split approach, I instead simply by hand extended the boundary to wrap around the back side of the half (of "F") I wanted, making a closed clipping polygon "A", and then used the documented ogr2ogr
Dan Jacobson's user avatar
0 votes

How to use ogr2ogr -clipdstsql?

. $ ogr2ogr zxl.buf.csv :memory: -lco GEOMETRY=AS_WKT -sql \ "SELECT ST_Buffer(ST_GeomFromText('POLYGON ((...))'),-.001,1) AS WKT" $ ogr2ogr zxl.0.lines.csv zxl.0.Q.csv -sql 'SELECT Name FROM "zxl.0.Q" …
Dan Jacobson's user avatar
0 votes

How to extract segments and compute their length using ogr2ogr?

. $ cat Makefile BB = ogr2ogr -dialect SQLITE -lco GEOMETRY=AS_WKT $@ $< FF = FROM "$(basename $<)" mm.csv:ll.csv cat $< $(BB) \ -sql 'SELECT (DissolveSegments(GEOMETRY)) AS WKT $(FF)' … $ make oo.csv cat ll.csv WKT "POLYGON ((0 0,5 0,5 9,0 9,0 0))" "POLYGON ((1 1,5 1,5 9,1 9,1 1))" ogr2ogr -dialect SQLITE -lco GEOMETRY=AS_WKT mm.csv ll.csv \ -sql 'SELECT (DissolveSegments(GEOMETRY)) AS …
Dan Jacobson's user avatar
3 votes

Constructing WKT POINT from GeoJSON data fields in OGR

Let's try that two step approach: Step 1: $ ogr2ogr qingfujie_roads.csv qingfujie_roads.geojson -dialect SQLite -sql \ 'SELECT land_id AS name, xcenter AS lon, ycenter AS lat FROM "qingfujie_roads"' $ …
Dan Jacobson's user avatar