Tag Info

New answers tagged

2

I believe you can to it with one ogr2ogr command. The following solution should work for all sort of geometries and therefore I tested it with a two-part multipolygon, one of the parts having a hole. Background: With -dialect SQLite GDAL tools can utilize all the SQL functions of Spatialite https://www.gaia-gis.it/gaia-sins/spatialite-sql-latest.html. ...


3

I found it, this dirty hack is not elegant at all but it works great, my command-line solution as follows: ogr2ogr -f CSV tmp.csv your.shp -lco GEOMETRY=AS_WKT -s_srs EPSG:4326 -t_srs EPSG:4326 -overwrite cat tmp.csv | sed -e '1,1d' | tr ',' '\n' | sed 's/[A-Za-z"()]*//g' | tr ' ' ',' | sed 's/^,//' > your.shp.csv One caveat, you just need to avoid ...


0

To be explicit about nickves' answer: ogr2ogr -append -f "PostgreSQL" PG:"dbname=db" shapefile.shp -nln mytable


0

well the winner is to not use the = sign. this works for anyone looking.. ogr2ogr -overwrite -t_srs EPSG:3978 -f "ESRI Shapefile" -dialect SQLite -where "GIVEN_CLASS LIKE 'CLAS% A" dst src indicating dialect + using -where + Like operator.


0

As @user30184 suggests, convert your shapefile to json and at the same time reproject it to WGS84 with: ogr2ogr -f GeoJSON -s_srs epsg:2180 -t_srs epsg:4326 wojeowdztwa.json wojewodztwa.shp Then, define the projection in your script like this: var projection = d3.geo.mercator() .center([21, 52]) .scale(2000) .translate([width / 2, height / ...


1

I found the answer on the gdal-dev mailing list. In summary, there are some .csv-files needed by the S-57 (ENC) reader. These are by default put in the GDAL_HOME/data directory (at least in GDAL 2.0.0), so for using ogrinfo you first need to do SET S57_CSV=C:\gdal\install\dir\data, then everything (both ogrinfo and your own programs) should be able to read ...


0

I don't know if it will help you but i tested with ogr2ogr command line tool and this command do the job (assuming 'Polygon' is the field containing the geometry in WKT) : ogr2ogr -f "ESRI Shapefile" output.shp -dialect sqlite -sql "SELECT *, GeomFromText(Polygon) FROM input" input.csv -a_srs "WGS84" Maybe you could adapt that to the ogr2ogr python tool ? ...


1

Using python code, you can not be sure in which folder the ogr command will be executed. In most cases, your data files will not be in a path included by the PATH variable, or the path where ogr2ogr.exe is located. Therefore it is always safe to add the full pathnames to source and destination files (for the python command as well as on the command line).


1

You can get GDAL 1.10 from http://download.osgeo.org/gdal/1.10.1/ and compile it the same way as you did with 1.9. BTW, GDAL 1.11.2 is the current stable version, and installing QGIS on a vanilla lubuntu 15.04 includes that GDAL version. So if you remove (delete the self-compilation and sudo apt-get purge the packages) all GDAL and QGIS stuff, then ...


1

The Pelias Geocoder from mapzen runs on elasticsearch, and uses OSM data by default, though it can use any data source. The importers are split into separate modules, so even if your not interested in using the pelias geocoder, you may still find the OSM importer useful. On another note: Shapefiles of OSM data are probably not what you want for source ...


1

Take a look at https://github.com/kiselev-dv/gazetteer/tree/develop/Gazetteer It will create you a json index for osm file. And you could use https://github.com/kiselev-dv/gazetteer/tree/develop/GazetteerWeb as an example of geocoder based on ElasticSearch


3

After several wrong ways, including multiple reinstall of libproj0 package and even installing QGIS from sources different from the Ubuntu Software Center default (I think it's from the official QGIS repository - http://qgis.org/debian trusty main), I understood how to apply advice by @EvilGenius: ldd ogrinfo didn't show libproj no matter how many times I ...


0

The Issue was resolved with a fresh installation of OSGeo



Top 50 recent answers are included