Tag Info

New answers tagged

3

From the ogr2ogr docs, use the -nln name option to assign an alternate name to the new layer.


2

If the Proj4 string that is stored into the GeoTIFF tags is correct this should be an easy case. Without cropping it would look like ogr2ogr -f "ESRI Shapefile" -s_srs epsg:4326 -t_srs "+proj=lcc +lat_1=47.5 +lat_0=47.5 +lon_0=4 +k_0=1 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs" projected_out.shp natural_earth_in.shp For cropping to the ...


2

Try the following: #!/bin/bash read -p 'Enter country code: ' EXP echo "exporting data from $EXP" echo ogr2ogr -f GeoJSON export.geojson PG:'dbname=alamedaok user=postgres host=localhost' -sql "SELECT id_alameda, pais, geom FROM poblaciones_def WHERE pais = '$EXP'" Notes: read uses the -p parameter to set the prompt You used backquotes (``) in your SQL ...


2

Bash is particular about the quote characters `, ' and ". Use double quotes to substitute the variable in a string like "wonderful $VAR". Also with Bash, the convention is that variables are upper-case, and I'd avoid using export as a variable name since it is a command for environment variables. Consider these changes: #!/bin/bash read -p "enter country ...


1

The definition for MGI_Austria_Lambert is straight from Esri software. It has several differences in naming conventions plus quirks in the projection/parameter names. Some of these date to older versions of the EPSG Geodetic Parameter Registry where Esri has not updated to match EPSG. Esri has one keyword for Lambert conformal conic and it's possible to ...


5

And, after a bit more reading the ogr2ogr help I found the answer more easily than I expected. ogr2ogr -f "PostgreSQL" PG:"dbname=db" spatialitedb -sql "SELECT * FROM table" -dialect spatialite -nln new_table EDIT: As suggested by user30184 in the comments a cleaner, simpler method is: ogr2ogr -f "PostgreSQL" PG:"dbname=db" spatialitedb ...


1

I ran into this exact problem because I hadn't extracted the zip file into the working directory. I was rushing to get the files converted and when I checked to make sure they were there, the "preview" that I got when I double-clicked on the zipped file tricked me into thinking they were available for conversion. Even if this wasn't the solution to your ...


1

Probably the easiest thing to do is use gdal_translate to create the resized image with something like: gdal_translate -outside 50% in.tif in.small.tif But if you do need to use ImageMagick, try translating your raster to a VRT first: gdal_translate in.tif in.vrt The resulting XML document should include all the relevant metadata, including the ...


1

If you save the Geotiff to png format using gdal_translate, an additional file with the extension.aux.xml will be written. It contains the metadata that your target format does not know. So it should be possible to process your image with ImageMagick, and use the information in the .aux.xml file afterwards.


1

The problem is caused by GDAL which seems to require that 3-dimensional coordinates are specified in GML at position level as <gml:posList srsDimension="3"> In the data dimensions are expressed only at geometry level <gml:Surface srsName="EPSG:25832" srsDimension="3"> This may be a bug or missing feature in GDAL and corresponding GDAL ...


1

You can use Spatial Manager for AutoCAD is an inexpensive product ($ 179), and allows you to import directly from PostGIS to AutoCAD. You can watch this video: http://www.spatialmanager.com/postgis-sql-server-basic-autocad-yes/ In the import process you can associate points with blocks in the drawing (among other options). You can download a trial version ...



Top 50 recent answers are included