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

learn more… | top users | synonyms

0
votes
0answers
7 views

Finding all segments that makeup a road in OSM

I've spent 2 days trying to figure this out and I'm afraid that it's something that's not possible. If that's the case then I'm thinking the wrong with with respect to OSM data. Let's say I have a ...
0
votes
0answers
11 views

How to speed up PostGIS-Raster based map algebra?

I am testing map algebra with PostGIS on two images, and found it to be rather slow. For example, dividing two images of 7200 * 3600 pixels took 110s on a desktop with i7 3.4 GHz CPU. The SQL ...
2
votes
2answers
29 views

How to encode a point geometry in Geojson?

I have point geometry in posgresql which I query as follows: select ST_AsText(geom) as pointgeom from pointable. I'm using python as server side script. I want to pass the result as Geojson response ...
0
votes
1answer
6 views

ST_MakeEnvelope vs casting BOX as box2d

When I'm filtering by bounding box, I've found that I can either do SELECT id, the_geom FROM my_table WHERE the_geom && ST_MakeEnvelope(minlng,minlat, maxlng,maxlat); as well as SELECT ...
0
votes
0answers
5 views

Learning pg_routing - shortest_path error

I'm learning PostGIS and pg_routing to help in our project planning and grant applications at my transportation agency (we wanted to move beyond the limitations of the 1/4 mile walking buffer we use ...
2
votes
1answer
12 views

How do I get the closest point on a road to a point when I have imported OSM data using osm2pgsql?

I have been trying to use OSM data to find the closest point to a road for a given point. I imported the OSM data into postgis using osm2pgsql, and I am getting results back, but they are at the ...
1
vote
0answers
22 views

Create GeoServer SQL View with variable number of arguments ( double precison [ ] )

I was trying to create a PostGIS procedural function which will perform a particular operation depending upon the user's provided coordinates. But since the user can provide any number of coordinates, ...
3
votes
2answers
65 views

Plotting Geo Points with “by arc centered at” Instructions

A recent Supreme Court decision redefined the legal boundaries of California along the Pacific Ocean: http://www.theverge.com/tldr/2014/12/15/7397085/supreme-court-california-boundaries-map I am ...
0
votes
0answers
20 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 ...
2
votes
2answers
30 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
0answers
21 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
28 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
11 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
34 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
13 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
54 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
42 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
56 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
31 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 ...
-2
votes
0answers
19 views

how to construct a perpendicular line from a point on a line using postgis [on hold]

I want to make a perpendicular line from a point on a line. How do I construct it with PostGis?
3
votes
1answer
18 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
48 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
44 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
37 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
31 views

IntraMaps Roam - does not update database

Has anyone had any experience with this software? The QGIS project I created for use with this software has a postgis database sync'd to offline mode (i.e. stored in sqlite on my hard drive). I do my ...
1
vote
0answers
33 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
195 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
46 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
17 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
18 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 ...
1
vote
0answers
30 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
78 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
39 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
47 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
50 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
42 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
111 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
31 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
23 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
46 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
52 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
77 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
22 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
59 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 ...
0
votes
1answer
31 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.
0
votes
2answers
37 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
42 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 ...
0
votes
0answers
56 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
43 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 ...