PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.

learn more… | top users | synonyms

0
votes
0answers
28 views

How can I prevent ogr2ogr from trying to get the SRID from PostGIS?

I'm running ogr2ogr for a PostGIS to GeoJSON export like this: ogr2ogr -s_srs EPSG:4326 -f GeoJSON unique_geoms.json "PG:host=localhost dbname=local_data user=local_user password=local_pass" -sql ...
3
votes
2answers
55 views

pgrouting - network distance many-to-one shortest paths

I want to find the distance (km) between each origin point to the closest destination point (restaurants) using pgrouting. I have 3 tables my road network with nodes and edges 140 origin points - ...
2
votes
1answer
58 views

osm: relation tags to nodes

I filter an osm planet extract using osmfilter. I am only interested in nodes belonging to route=subway relations. After performing this operation, I use osm2psql to load all the data into my postgres ...
2
votes
0answers
35 views

filling the attributes according to intersection of two layers (Postgresql)

How to automatically fill attributes of a point layer according to the exact position in the polygon layer? I mean how to write a command in PostgreSQL to automatically fill the attributes by the ...
0
votes
0answers
31 views

PGeo: MDB Tools driver not found

I'm trying to load a Access .gdb(.mdb) database into postgis using ogr2ogr. I'm running Ubuntu 14.04 with gdal 1.10. I've install both unixODBC and mdbtools as per the instructions at ...
1
vote
1answer
48 views

Correct installation of postgresql and postgis

Goodmorning everybody! I'm new in this forum and I hope you would help me in solving my problem. I'm practicing the use of Qgis and i need to setup postgresql and postgis on my mac yosemite 10.10. ...
2
votes
0answers
15 views

What are the problems of loading overlapping (or the same) tifs into postgis?

I am still early on the Postgis learning curve. I have an existing table in Postgres - it looks like this: create table "public"."mytable" ( "rid" serial primary key, "rast" raster, "filename" ...
2
votes
2answers
80 views

How to change from EPSG:900913 to EPSG:3857 in Postgresql

I didn't use the '-E 3857' switch when importing the OSM data into postgresql using osm2psql. I'm trying to set up a map server for the first time and I'm following the instructions from here: ...
1
vote
1answer
57 views

How to select geography features within a certain distance given in miles?

I am just taking the first steps in using POSTGIS, but having trouble finding a simple example. I have a database with a Key field, lat and lon fields and a GEOGRAPHY field. I just want to have a ...
3
votes
1answer
83 views

clip geometries in postgis table if they are inside a polygon

I have polygons defined in KML files just like this one, which I can easily parse. Example: <Polygon><outerBoundaryIs><LinearRing><coordinates> -91.463940,40.372660,0 ...
1
vote
1answer
36 views

how to get a line that coincident with another line?

I have 2 linestrings: Linestring 1 (-3 3, 6 8, 15 9, 22 13, 28.5 15.7) --> red color Linestring 2 (0 4.66666666666667, 6 8, 10 8.44444444444444) --> blue color Actually both two linestrings are ...
4
votes
2answers
32 views

How to extract nodes with PostGIS to a multipoint geometry

I have a line in a PostGIS table test_line. I want to extract it's nodes into a multipoint geometry. I tried the following: SELECT ST_Collect((ST_DumpPoints(the_geom)).geom) FROM test_line; But it ...
0
votes
0answers
67 views

MapServer/WFS with filter doesn't return result

I'm using MapServer version 6.4.1 with PostGIS for my GIS app. When querying a property through 'REQUEST=GetFeature' MapServer returns all the expected data correctly, but if it's set a simple filter, ...
2
votes
1answer
54 views

Is it possible to use spatial function to retrieve non-spatial data?

I'm using PostGIS in postgresql.I wish to calculate points within the radius from particular geocode.For that i have created a table with spatial column geocode having datatype as geometry and ...
1
vote
2answers
57 views

Ensuring SRID on geometry column in PostGIS

I am using a table that has a geometry type column called "wkt". Its definition in the table looks like this: create table sometable ( ... wkt geometry not null, ... ); I want to change it ...
0
votes
0answers
61 views

IntraMaps Roam does not update PostGIS database?

The QGIS project I created for use with IntraMaps Roam has a PostGIS database sync'd to offline mode (i.e. stored in sqlite on my hard drive). I do my edits in Roam and it goes great, the local file ...
1
vote
0answers
35 views

create automatically temperature or isotherms map with PostGIS?

Is there any possibility to create automatically temperature or isotherms map through a points table stored in PostGIS? I need to serve this map on a web (Geoserver). The information is updated each ...
3
votes
3answers
203 views

Which equal-area projection to use for UK?

I have a bunch of UK polygons that are saved in my PostGIS database as WGS84 projection. I would like to calculate the area of these polygons using st_area. According to this answer I can save these ...
3
votes
1answer
53 views

Confused about ST_DWithin function postgis

First Time here. Anyway, I have a database that I want to use to store user locations. I want to be able to get all the users with in say 15 miles. How do I do this. I'm using PostGIS 2.1. My SQL ...
1
vote
0answers
23 views

How to Increase the length of column type geometry in postgres(pgAdminIII)

I am just wondering is there any way to increase the default length of column type geometry in postgres. Since we are trying to save large number of vertices polygon in to the geometry column geom in ...
0
votes
0answers
23 views

Any way to speed up my postgis topology creation?

I need to do topology aware simplification, and I'm investigating PostGIS's new topology extension. However it's taking a very long time to create the topology, and I'd like to know if there's ...
2
votes
1answer
66 views

Query to Dissolve Nearby Polygons on Hive

I am using the ESRI spatial framework for Hadoop, that extends Hive to use spatial types and operations. My objective is to translate a set of simple queries on PostGIS into Hadoop, in order to ...
1
vote
1answer
97 views

How to split lines with PostGIS and view the result in QGIS?

I have two tables, one contains lines (test_line) and the other contains the points at the vertices of the lines (test_line_vertex). I want to split the line into individual segments based on the ...
0
votes
0answers
30 views

Upload SHP to PostgreSQL via QGIS

There was the error when I try to upload the SHP to the PostGRESQL. The feature is the line type. The error was: ERROR: Geometry type (LineString) does not match column type (MultiLineString) Do ...
0
votes
0answers
44 views

Cannot see line made with PostGIS ST_MakeLine() in QGIS

I am probably missing something obvious while trying to do this basic job. thetable contains gps track points. The following aims join the track points by a line: CREATE VIEW line01 AS ( SELECT ...
0
votes
0answers
63 views

Store GPS trace with timestamps, then interpolate location by time

I'd like to: Load a 1-second interval GPS trace (not GPX) into PostGIS Then query the table at sub-second accuracy (about 5Hz), and get PostGIS to interpolate the location by time. Is this ...
2
votes
0answers
64 views

Cartographic-complete Maps in PDF On Request using Open Source?

Currently I have some data in PostGIS. I want to implement the following: users will make a request via web, with parameters like location, scale, layers to be displayed, etc. and I need to provide ...
1
vote
2answers
45 views

How to get the geometry value from coordinates

I have a table with empty geometry column. I have two columns in the same table which has xcoordinate and ycoordinate values. I want to get the geometry value formed by these two coordinates. The ...
4
votes
2answers
176 views

Why is the Google Maps circle shape not matching to the distance calculated with PostgreSQL?

I am running a PostgreSQL 9.1 Database with PostGIS 1.5 extension. Several coordinates are stored in there with type GEOMETRY (SRID 4326). I'm building a web-application with Google Maps Javascript ...
2
votes
1answer
36 views

How do I get the vector and raster metadata from a PostGIS database?

im using php/postgres/postgis in a webapp, im wondering if its possible to get metadata from the db about all shp/geotiff table like (name, projection, type(ship/tiff), date, desc, owner etc ...) i ...
2
votes
1answer
32 views

PostGIS GML round trip confusion

I've investigated the issue of coordinate order in GML and each time I think I've got it but I find my self confused once again. I think some of my confusion may be to do with PostGIS. Doing a ...
0
votes
1answer
54 views

Delete duplicate geometry in postgis tables

After - I dont know what happend - all my entry's in my postgis tables are doubled! I tryed that to delete them but it does not delete any/all duplicates: DELETE FROM planet_osm_point WHERE ...
4
votes
0answers
70 views

Vector to raster, then map algebra

I have a table of polygons representing travel time isochrones on particular days. For each origin point, there are five isochrone geometries (stored in separate rows). For each origin point, I want ...
3
votes
2answers
84 views

How can I smooth or resample a DEM to find steep roads?

I am trying to find sections of road with steep gradients. My process is: pull a linestring from Openstreetmap data resample it to create a point every 10 metres look up the height data for each ...
0
votes
1answer
48 views

Print button greyed out on GeoExplorer

I have recently downloaded and installed the OpenGeo Suite from Boundless, and I am running through a few tutorials. I'm using GeoExplorer to manipulate layers defined in GeoServer (running from my ...
2
votes
2answers
68 views

How to export thousands of features from PostGIS to a single GeoJSON file?

I know how to export one feature from a PostGIS database using ogr2ogr: $ogr2ogr -f GeoJSON out.json "PG:host=localhost dbname=xxx user=xxx password=xxx" -sql 'select id, county, wkb_geometry from ...
1
vote
1answer
44 views

how to query contour postgres db for elevation at a point using postgis

Is there a way to interpolate between these contour lines for a given point using postgis? Thanks. I've come up with the following query to gather the potential contour lines of interest: ...
0
votes
2answers
57 views

How can I measure linestring on postgis?

I have a linestring and I want to measure this line. I try it on google maps. the result is that 0,65 km ...
1
vote
2answers
50 views

postgresql rule to trigger

I have two spatial tables and I am mirroring the data between the two table with a postgres rule: CREATE OR REPLACE RULE create_centroid AS ON INSERT TO csg.client_area_request DO INSERT INTO ...
1
vote
1answer
96 views

Downloading the distribute_setup.py

I need to download distribute_setup.py from the following website and the website seems to be broken, has anyone got an idea where else I can download this from? ...
1
vote
1answer
50 views

Get closest (source or target) of an edge from a point in postgres

I have a Postgres custom function that uses pgr_dijkstra to generate a route working. It works be passing the lat/lon of the start and destination points. I then find the closest segment vertice to ...
3
votes
1answer
71 views

artifacts in SRTM contour layers processed with GDAL tools and rendered with mapnik

Here is my workflow for importing individual SRTM tiles into postgis using the GDAL utils and rendering a png using mapnik: gdal_fillnodata.py -srcnodata -32768 gdal_contour -i 10 -a ele -snodata ...
0
votes
1answer
71 views

Split OSM highways at vertice

I am looking for a tool or query to split the OSM highways into multiple segments. Each segment should only consist of two nodes (start and end). I should do the same as described in this GIS ...
2
votes
2answers
80 views

finding the outermost border of a set of geomertries (circles)

I have a (large) set of geometries (circles) that overlap.! I would like to find the nearest location outside of this group from my current location. In this example my location is the black dot. In ...
1
vote
1answer
59 views

Creating new lines from existing lines based on points lying along the lines

I am pretty new to PostGIS and I have a problem I just can't figure how to start. I have a table of lines (id, name, the_geom) and a table of points (id, name, the_geom). Each point is located on a ...
1
vote
2answers
135 views

QGIS project with PostGIS layers freezes irregularly for minutes

I'm using about 30 more or less complex PostGIS layer in my QGIS project. Some of them are PlanetOSM layer generated with osm2pgsql. The Project loads fast (ca 5 sec). The canvas update by moving or ...
1
vote
0answers
30 views

Import .gfs file into PostGIS?

Is it possible to import a .gfs file into PostGIS? I can open the .gfs file in QGis, so I assume it is a geographic file of some kind: but I'm not sure how to get it into PostGIS. I have Googled but ...
2
votes
1answer
37 views

ogr2ogr: Can I add a field when I import to PostGIS?

I have a bunch of GeoJSON files that I want to import to a PostGIS database. I can import individual files perfectly as follows: ogr2ogr -f PostgreSQL PG:"host=x user=x dbname=x password=x" ...
4
votes
1answer
161 views

PostGIS doesn't use index for spatial query

I can't get PostGIS 2.1 running on PostgreSQL 9.3.5 to use a spatial index even for the simplest queries. The whole dataset is 8 million points (population count grid from here ...
0
votes
0answers
32 views

Generate random points in geometry near heatspots

I have an algorithm, that generates random points with in a given polygon (Generate random points in polygon. Algorithm question). The Polygons the points are generated in are communities or districts ...