Tag Info

Hot answers tagged

5

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" ...


5

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

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

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.


2

FWTools provides supposedly easy-t-use wrappers for a lot of the GDAL functions. Once upon a time FWTools was THE defacto place to go and get your GDAL binaries, but not anymore. Personally I think the Python API for GDAL/OGR is already easy enough for scripting and FWTools is a bit redundant (though it gives some nice convenient utilities in QGIS - so has ...


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

Just install GDAL and run it from Bash / terminal. ogr2ogr -f "ESRI Shapefile" mydata.shp PG:"host=myhost user=myloginname dbname=mydbname password=mypassword" "mytable" Or do not even bother with GDAL and just use something like below in terminal. # pgsql2shp -f myfile -p 5555 my_db roads_table


1

Generally speaking FWTools is pretty old and it should be used with care. However, FWTools is very easy to install and therefore I keep FWTools 2.0.6 and a few more versions always with me on USB stick. FWTools includes its own python and at least those python scripts which are included in the \bin directory of FWTools should work without troubles. Open ...


1

It looks like the "EPSG: {0]" format doesn't work with the Transform methods. However, I (actually, credit goes to a co-worker of mine) was able to get the Transforms working with a PROJCS spatial reference definition. And I was also able to get it working with the SpatialReference.ImportFromEPSG. [TestMethod()] public void ...


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

With Google or Openstreetmap background, the original jpg is about 300metres off the correct position. Thats far more than the shift between NAD27 and NAD83. So you have three opportunities: 1) ask the data provider how they georeferenced the photos. 2) if the shift is constantly througout all imagery, you can create a custom CRS (in Arcgis: custom datum ...


1

use this code with entering its folder with your command line: for %f in (*.tab) do ogr2ogr -f "ESRI Shapefile" %~new.shp %f i hope it helps you...


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