Tag Info

Hot answers tagged

9

It is not a string format. It is a binary format using integers, double precission and special bytes used for flags. What you see as output above is not the internal format but the wkb format represented as hex numbers The internal format is described here: http://trac.osgeo.org/postgis/browser/trunk/liblwgeom/g_serialized.txt The document is written ...


3

First use st_closestpoint. Then from the result make a vertical line that passes the multilinestring. Finally use st_3dclosestpoint between the vertical line and the multiline. Theoretically you could use st_3dintersects instead but that will cause you problems from precision issues.


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

Your approach looks ok to me. On my local system, I skipped the TileCache part. Mapnik fills the folders in the way Openlayers reads them from disk using file:///... I don't know if leaflet can do it the same way. For the satellite tiles: You have no chance to get them legally. Google and bing do not like storing their tiles locally. If you have ...


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

First, use https://mapzen.com/metro-extracts/ for more up to date data. Second, you seem to be loading a raw osm file, and not a shapefile. Please try the same with "osm2pgsql shp" or "imposm shp" file for your region.


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


1

You specify that the route should start on node 1 but there is no node 1 in the query result set. That can't work ... According to the documentation http://docs.pgrouting.org/dev/src/tsp/doc/index.html, you should specify the start point id. This works: create table tsp_test (id integer, x double precision, y double precision); insert into tsp_test ...


1

For the satellite tiles, you could render them yourself using Mapnik. Landsat and NAIP are two sources of free satellite raster data. edit: I've also just come across a growing dataset (also free) of High Resolution Orthoimagery, which I've never used, but is much higher detail than the other two sources.


1

In general: ALTER TABLE your_table ADD COLUMN area double precision; UPDATE your_table SET area=ST_AREA(geom::geography); (If your srid is 4326 and your data is stored as geometry) Edit: To round to 2 decimals use round() funcrion. If I remember right it works on numeric type and not double precision. So you need something like: ...


1

They are called diff updates. You have two options .. Apply the Diffs from PlanetOSM and then remove the imported geometry that are outside of your bounding box Use the Geofabrik Extracts for North America and apply the Geofabrik diffs which are updated daily. I do both, 3 minute diff updates for the planet and daily diff updates for the Philippines, in ...



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