Tag Info

Hot answers tagged

4

In Python the os module provides a quick and dirty way to run a command line argument such as the one you posted as part of a larger script as outlined in the Python documentation import os command = "ogr2ogr -f \"ESRI Shapefile\" E:\\CABWorking\\MapINFO2SHP\\SHP\\LincsBoundary.shp E:\\CABWorking\\MapINFO2SHP\\MapINFOData\\Lincolnshire.tab" ...


2

There dosen't appear to be a EPSG for that. It seems to be ESRI specific: http://help.arcgis.com/en/arcgisexplorer/2500/sdk/componenthelp/index.html#/NAD1983CORS96StatePlaneMichiganSouthFIPS2113IntlFt_Property/000300000znr000000/ You can get a WKT, prj etc. file from here: http://spatialreference.org/ref/esri/102690/


2

reference: Location GEOMETRY NOT NULL, spatial indexes should be created on GEOMETRY types. CREATE TABLE `test_poly` ( `Id` int(11) NOT NULL, `Name` varchar(255) NOT NULL, `Location` GEOMETRY NOT NULL, PRIMARY KEY (`Id`), SPATIAL KEY (`Location`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; source: ...


2

You have to force the SHP geometry type (because the geometry type of GeoJSON Geometry Collection is not supported in SHPs) and use the -skipfailures option: ogr2ogr -nlt POINT -skipfailures points.shp geojsonfile.json OGRGeoJSON ogr2ogr -nlt LINESTRING -skipfailures linestrings.shp geojsonfile.json OGRGeoJSON ogr2ogr -nlt POLYGON -skipfailures ...


2

Please do not use FWTools anymore. It is outdated for some time now. Running Windows, you can get the latest GDAL binaries at http://gisinternals.com/sdk In the command line, you don't have to write \"GEOJSON\". -f GeoJSON should run fine.


1

From the GDAL Wiki: Important note: the FWTools binaries are not currently updated... The GDAL/OGR version in FWTools is 1.7 from 2010. I'm not sure when gdallocationinfo was included in GDAL, but it wasn't announced until late 2010 Try the OSGeo4W or GIS Internals GDAL binaries instead.


1

I downloaded OSGeo4W http://trac.osgeo.org/osgeo4w/ and installed the GDal packages, the current GDal version installed is 1.10 and then this command worked fine: ogr2ogr REGC2013_GV_Clipped_lonlat_2d.shp REGC2013_GV_Clipped_lonlat.shp -dim 2


1

You can use a specific column for extruding a shapefile to a kml using GDAL's ogr2ogr utility, but only if it's been compiled with libkml support. If it's been compiled with libkml support, that will become the default KML driver. So you can try the following, first specify the zfield to be used in an environment variable, then run the ogr2ogr utility: # ...


1

I know that this response is 6 months late, but you could use the development build found here - http://www.gisinternals.com/sdk/ or you could build your own. In order to accomplish what you are wanting to do without obtaining a third party encoding sdk, you will need the OpenJPEG library (v2) library - http://www.gdal.org/frmt_jp2openjpeg.html


1

Could you check if the records that weren't imported all have valid data? This sounds similar to the behavior exhibited by QGIS at this thread. In that thread, QGIS stops importing once it encounters a record with invalid data. As QGIS uses GDAL/OGR too, I'm guessing it's exhibiting similar behavior here. Granted, this is a file geodatabase while the one in ...



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