New answers tagged postgis-2.0
osm2pgsql is surely designed to import the whole planet into postgis. You have to make sure to use a recent version of osm2pgsql, because the node numbers in OSM have hit a limit which made it necessary to change the number format from integer to long integer. Older versions of osm2pgsql will fail therefore. On windows, there are a few more pitfalls. You ...
Maybe osmosis is the option you are looking for. You can use osmosis to import all tags into the postgis database. Since osmosis does not build GIS ready to use objects you must do this in a separate process using SQL. A very good collection to start with are the osmosis layers from moenk available on github.
This is a case sensitivity/quoting issue. "PointsForGpxExport" and PointsForGpxExport are not the same table name. PostgreSQL, per the SQL standard, case-folds unquoted identifiers. (It case-folds to lowercase, where the standard says uppercase, though). So when you write PointsForGpxExport, PostgreSQL treats that as the same as pointsforgpxexport. Since ...
GIS functions and the geometry_column, spatial reference tables etc do not exist by default in PostgreSql. You need to install the PostGIS extension (which you can add to an existing instance of PostgreSql or add when you install a fresh instance of PostgreSql). Go to the PostGIS Getting Started documentation and follow the directions on how to CREATE ...
If you have global data, use a geography type: CREATE TABLE points ( gid serial primary key, name character varying, point geography(Point,4326) ); CREATE INDEX points_point_idx ON points USING gist (point); Then use a function that can use the spatial index, using a metric distance (see ST_DWithin) SELECT name, point FROM points, (SELECT ...
The GPX format is a standard text tag format and so can be built as a text file manually or with code if necessary. Most spatial software (if you have access to it: QGIS, ArcGIS, Global Mapper etc) will have utilities to simplify the conversion from a file or feature class to GPX in some form. Depending on how you wish to build your GPX file (track points ...
SPIT don't allow import Multipolygon geometry in PostGIS database (QGIS, Postgis: Geometry type does not match column type). Use DB Manager tool to import MultiPolygonal geometry.
I think it has something to do with fact that your geometry is MultiPolygon instead of Polygon that is used in your layer. I remember there is a conversion tool for handling this problem during import.
You can also use DNRGPS to convert from PostgreSQL to GPX. Great utility.
Not quite in PostGIS but you should be able to extract it using ogr2ogr's GPX driver ogr2ogr -f GPX points.gpx PG:'host=your_server user=your_username dbname=your_database' http://www.gdal.org/drv_gpx.html
The ST_Transform function has quite simple parameters: a geometry object and a target SRID. This should do it. SELECT name, ST_AsText(ST_Transform(point,2811)) FROM points;
Top 50 recent answers are included