Tag Info

Hot answers tagged

3

You can use ogr2ogr with the -sql option to use a sql statement


2

JJD yes there is. I haven't used it myself. You use the -m option and pass a mapping file that has the old column name and new column name on each line. As Ryan alluded to here: http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg I suspect he was thinking of -m and mistyped -f. Hope that helps, Regina


2

You've switched the order of your lat,lon. See the documentation for ST_MakePoint() and you'll see that it requires: ST_SetSRID(ST_MakePoint(lon, lat),4326) Then, after to make your changes, try verifying: SELECT ST_AsText(location) FROM *tablename* LIMIT 10;


1

myVectorLayer = QgsVectorLayer("polygon", "mypoly", 'ogr') does not create a valid vector layer, therefore mySymbol1 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType()) does not return a valid symbol and causes the error you see. Replace "polygon" with a valid file path.


1

AFAIK there is currently no 'best practise' on how you organize the OSM data at your PostGIS backend. There are different database schemas that are tuned for specific purposes: rendering geospatial lookups / reverse geocoding fulltext search / gazetter ... If you have a very specific usecase, you might tweak the OSM importer mappings (e.g. at osmosis or ...



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