Tag Info

New answers tagged

1

ST_Length, when called on a geometry, reports in units of the spatial reference system. For EPSG:900913/EPSG:3857, the units are in Mercator meters, not in meters. At all points on the globe, a Mercator meter is at most 1 real meter. To do this there are two possible fixes Transform to an appropriate projection for your area. UTM, state plane and albers ...


1

osm2pgsql is a good option for working with OpenStreetMap data like this, particularly if you have enough data you need a database to store it. You would find building information in planet_osm_polygon. You could get it using a query like SELECT * FROM planet_osm_polygon WHERE building IS NOT NULL and building != 'no'. For addresses you may find that ...


0

Make sure that your version of osm2pgsql is built for the version of postgis you have. There were some major changes in postgis 2.0. It might help to run the legacy.sql to add the old functions again, see http://postgis.org/documentation/manual-2.1SVN/PostGIS_FAQ.html#legacy_faq EDIT Second choice: ...


-1

AFAIK the most OSM tools rely on a 4326 projection, so it's not a wise idea to change the DB schema to a different one. Instead you could write a small wrapper or use e.g. Geoserver to reproject the geometries per request.


0

The syntax for osm2pgsql is osm2pgsql [options] planet.osm.{pbf,gz,bz2}. Like most command-line programs, osm2pgsql takes the input file name at the end of the command line.


0

There’s a thorough explanation in the PostGIS FAQ: In PostGIS 2, the default geometry operator class gist_geometry_ops was changed to gist_geometry_ops_2d and the gist_geometry_ops was completely removed. Simply remove the gist_geometry_ops statement, changing this: CREATE INDEX idx_my_table_geom ON my_table USING gist(geom gist_geometry_ops); To ...


1

After the import of the raw data, osm2pgsql builds the polygon data out of closed ways and multipolygon relations. Building indices is the last step, so you might rescue the polygons. I'm not sure at what stage the planet_osm_roads are generated from the planet_osm_lines. These are needed for low level zoom of roads and railways. But I would not be sure ...


0

The source tag is always deleted. This is hardcoded in osm2pgsql / parse-primitive.c and parse-xml2.c: /* 'created_by' and 'source' are common and not interesting to mapnik renderer */ if (strcmp((char *)xk, "created_by") && strcmp((char *)xk, "source")) { ... To keep the source tag, there are two options: Change the code and compile ...


2

The names of the tables should be self-explaining: planet_osm_point is a point layer file planet_osm_line is a line layer file planet_osm_roads similar to line, contaning simplified geometries of roads and railways for lower zoom levels planet_osm_polygon contains (multi-)polygons These tables reflect the OSM datamodel in the way they can be used GIS ...



Top 50 recent answers are included