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

learn more… | top users | synonyms

3
votes
3answers
953 views

How to Calculate length of polyline geometry for several tables in PostGIS?

PostGIS database contains several geometry (polyline) tables (with names "D1_r", "D2_r", "D3_r"). I calculate length for one "postgis layer" use request: SELECT ...
2
votes
1answer
270 views

Hyperlinking to PostGIS Layers and Zip files with QGIS Actions

I previously asked a question about hyperlinking data in QGIS that gets loaded into QGIS (see post: Hyperlinking in QGIS - Add Data to current window). A user provided me with the code, which works ...
2
votes
3answers
2k views

Render vectors from OSM data in POSTGIS database

I'm a newbie when it comes to mapping application. I had successfully loaded my OpenstreetMap data in a Postgresql/PostGIS database. Now my problem is how to render the vector data (the POI's, ways, ...
7
votes
2answers
3k views

PostGIS ST_Buffer Radius Help

I am trying to find all points within a five-mile radius of a given point. I have a query like this: SELECT * FROM table WHERE ST_Contains(ST_Buffer(geomFromText('POINT(0 0)', 4326), ?), latlon) I ...
5
votes
1answer
2k views

How do I perform a proximity search with Postgis?

OK, so I downloaded the Geonames database (cities1000) and wrote a small Ruby program to import them into my table (geo_cities). I then added geography column called geog. So after all of that, I ...
5
votes
1answer
4k views

qgis to local postgis connection - fails

It seems pretty clear I cannot connect to a local postgresql installation out of QGIS. This is my first experience with PostGIS. I am using PostgreSQL 9.0 on a win7 machine. I can see the successful ...
4
votes
2answers
144 views

How to connect points (bus stops), which don't lie on the lines (LINESTRING), to a network?

I need to connect bus stops (points) to a network layer (OSM data). These bus stops do not lie directly on the lines (see screenshot) nor should their location be moved. I use PostGIS, pgrouting and ...
4
votes
1answer
477 views

How to create linestrings with a definite angle and length, that are fixed to a point

I want to create linestrings with a definite angle (e.g. 160°) and length (e.g. 2m) that are fixed to a number of points of another linestring. So, I want to use the ST_DumpPoints function to find the ...
4
votes
3answers
546 views

Loading raster data to postgis

I'm a newbie in GIS technology and need some help in loading a rainfall radar raster data into PostGIS. The raster image is shown here: What I need is to store in the database the radar ...
2
votes
2answers
65 views

Where to type pgsql2shp command

How to convert post gis database into shapefile, I found that I need to use pgsql2shp command on postgis database query , But how to use it and where to use it. Do I have to use it in the postgre sql ...
2
votes
2answers
98 views

How to create more networking osm

Using localhost page generated by osm2po roteamente noticed that the link is made to link even disabling snapping. Logically thought to create more nodes in the network, but how can I do this ...
2
votes
1answer
3k views

Transforming from SRID 900913 to 4326 with PostGis

I have two Postgres tables with different SRIDs, 4326, and 900913. I want to convert the latter to 4236. I first changed the SRID using: Select UpdateGeometrySRID('table', 'geomcolumn', 4326). I ...
2
votes
1answer
368 views

In what situations would SpatiaLite be selected over PostGIS, and vice versa?

I know that SpatiaLite is a lightweight solution. Would it be a problem if I put it on a 5K pageview/day site? Is PostGIS too resources-consuming for such usage? The dataset is something like < ...
2
votes
1answer
2k views

Why does ST_Transform fail?

I got a postGIS error like this, ERROR: transform: couldn't project point (100.496 13.7118 0): latitude or longitude exceeded limits (-14) SELECT ...
1
vote
1answer
264 views

Automatic bulk snapping with FOSS

I'm looking for a tool that would be able to automatically snap features closer than a given distance. Is there such a tool/plugin for QGIS/GRASS/OpenJump? Would it be possible to achieve that with ...
0
votes
3answers
163 views

Import shapefiles on my postgis table using R

Using R, I would like to import shapefiles that are in a directory on a geometric table i have on postgresql / postgis. What is the instruction that allows me to do it? EDIT: here is my code to ...
8
votes
1answer
1k views

How to perform a spatial join of point and polygon layers in PostGIS?

I have a point dataset representing households that I want to associate with a parcel layer (i.e. assign its parcel_id). With ArcMap, I could spatially join the polygons to the points and specify that ...
7
votes
2answers
815 views

Growing a PostGIS geometry by a percentage

I'm looking for a way to add a buffer around a PostGIS geometry, but the size of the buffer should depend on size of the geometry. That is, I want each geometry to be enlargened by, say, 5%. The idea ...
6
votes
2answers
721 views

PostGIS - area-weighted calculation on an intersection

I'm trying to learn postgis sql by performing some familiar operations from ArcGIS. Here, I want to perform an area-weighted calculation of certain populations on the intersection of a set of parcels ...
5
votes
1answer
246 views

Calculating path sinuosity in postgis

Sinuosity is a fairly straightforward concept. How can this be calculated in postgis given a series of linestrings that represent the path?
5
votes
3answers
1k views

How to create spider diagrams (hub lines) in PostGIS?

I'm rather new to PostGIS but I have done a lot of reading. One thing that I have been searching for is a function that allows users to create a "spider diagram" (also called "desire lines" or "hub ...
4
votes
3answers
471 views

PostGIS non functional on Ubuntu 14.04

I am unable to create the PostGIS extension on new databases in Ubuntu 14.04: $ psql pg_testing -c "create extension postgis" ERROR: could not load library ...
4
votes
1answer
124 views

How to transform a set of street-segments into city-blocks, with PostGIS2?

Theoretically is possible to obtain the polygons of city blocks (urban blocks) from streets, when streets are represented by street axis (LineStrings). The urban blocks are bounded by streets, so ...
4
votes
3answers
466 views

How to efficiently find points within an elliptical area?

Using PostGIS 2.0.0 I need to filter the results of a function, which returns many POINTs, to find the ones that lie within an elliptical area defined by two points and a distance (all parameters ...
3
votes
1answer
89 views

Calculate distance between point and linestring and how to represent that on QGIS?

I have loaded my data with osm2pgrouting and I have my network with ways (Linestring) and nodes (Point). The problem is : I have a database of doctors addresses (point) and I should calculate the ...
3
votes
3answers
198 views

How can I draw squares in PostGIS layers at different angles?

I am trying to draw two squares on a 45-degree angle and then merge them using PostGIS to edit. QGIS can draw squares but only on a perpendicular plane (eg, 0, 90, 180), and I need to be able to draw ...
3
votes
2answers
2k views

How do I use st_dwithin with meters?

I am trying to follow PostGIS ST_Buffer Radius Help to use a 50 meter distance but postgis is returning an error. I am trying the following SQL, SELECT id FROM table WHERE ...
3
votes
0answers
472 views

How can I properly add PostGIS data into MapGuide Maestro?

I am having trouble connecting a PostGIS database to MapGuide Maestro. Actually, I have added the PostGIS data into Maestro, but when I click to validate the layer it shows an error message: ...
3
votes
2answers
3k views

Postgis installation error

I am using fedora machine. I want to install postgis on my system. So this is what I have done Installed Postgresql and supporting packages using YUM. Created directory /sources to put all the ...
2
votes
1answer
298 views

Unreachable vertex

I'm developing an application for academic purposes that mainly gives to the user a recommended itinerary for a previously introduced preferences (Gastronomy, Leisure,etc.). For this purpose, I use ...
2
votes
1answer
786 views

Why does my PostGIS query fail with “current transaction is aborted”

I'm trying to create a vector layer in a QGIS project using a PostGIS query. QGIS is returning the following error: Query failed 1 cursor states lost. SQL: CLOSE qgisf1 Result: 7 (ERROR: ...
2
votes
2answers
953 views

DatabaseError: Coordinate values are out of range [-180 -90, 180 90] for GEOGRAHY type

I am using Django 1.3, PostGIS 2.0 , Postgresql 9.0 and GeoDjango. I had a database with a table for places. This table had latitude and longitude for places in the US. I enabled this database with ...
2
votes
1answer
204 views

Automated correction of parcel geometry based on area measure?

i have a set of parcels in DWG file and i have the areas that should be in these parcels in an excel file, so i have to modify each parcel to match the area specified in the excel file with a moving ...
1
vote
3answers
101 views

How to complete the roads output of PostGIS?

I converted the file I exported from OSM to PostGIS using osm2pgsql. I have opened the table's outputs to QGIS and I saw data are not complete compare to OSM editor view. Most of the roads are broken ...
1
vote
2answers
227 views

Searching planet_osm_point by longitude and latitude

I used osm2pgsql to import data into my PostgreSQL database and it put gave me the following 4 tables, planet_osm_point, planet_osm_line, planet_osm_polygon and planet_osm_roads. I have looked at ...
1
vote
1answer
129 views

Routing in MS SQL 2012

I would like to perform routing in MS SQL 2012 similar to pgRouting. In pgRouting, I'd do the following steps to create a routable network: Create a database routing with template template_routing ...
1
vote
1answer
797 views

How to Import ESRI Geodatabase format .gdb into PostGIS

I ran into a problem when loading a ESRI Geodatabase format .gdb into PostGIS. I have data 2.5GB GDB file. I followed some tutorials on the internet, but it seems that doesn't work out. I created a ...
1
vote
2answers
474 views

ST_DWithin uses Geometry or Geography type

assuming I use the following query to match the locations to a poi within 10km distance: SELECT poi.poi_id, h.loc_id, (ST_Distance(poi.geom,h.geom)*111.111) as distanceinkm FROM iut_poi_transl AS ...
1
vote
1answer
727 views

GeoServer WPS Aggregation Functions Example

The scenario: I want to present a user with names of polygons from a layer in GeoServer. I then display the polygon(s) whose name(s) the user selected. What I've done: I have a search box, which ...
0
votes
1answer
100 views

PostGIS: ST_Clip() raster in SRID:32617 with a polygon

I'm trying to ST_Clip() raster in `SRID:32617' with a polygon. What I did ST_Transform(polygon, 32617): It fails, couldn't project point() exceeded limit (-14) ST_Transform(rast, 4326, ...
0
votes
1answer
294 views

Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type

After import some data from OSM file into Postgre, the coordinates numbers are too big and having trouble to cast to Geography: Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY ...
0
votes
0answers
84 views

not able to view imported .tif file in geoserver

I am using geoserver. I have imported a .tif file using postgis, which has been saved in vector type layer in geoserver. Now, whenever, I preview it, the layer gets automatically downloaded as wms ...
18
votes
7answers
1k views

Spatial databases learning resources for newbies

Would be taking up a course on spatial databases next semester. Would anybody know a newbie friendly introductory resource? A vendor neutral one would be preferable. Thanks.
14
votes
5answers
1k views

Find pseudo nodes in free GIS software

Software gvSIG OA Digital Edition 2010 have tools topology for finding pseudo nodes in linear geometry. I set cluster tolerance 0.00002 and maximum number of errors -10000 for 20000 link count linear ...
10
votes
1answer
6k views

Geocode quality: Nominatim vs. PostGIS Geocoder vs. Geocoder::US 2.0

I occasionally need to geocode >> 500,000 US street addresses (no features or intersections). I'd like to set up a geocoding service locally to handle these bulk geocodes. I've used the Tiger-based ...
18
votes
1answer
2k views

Comparison of geocoding solutions (such as Gisgraphy & PostGIS 2.0)

As I am sure many of you are aware, PostGIS has finally released Version 2.0 and included within this version they have also built a geocoder (see: http://postgis.net/docs/Extras.html). Although I ...
17
votes
6answers
3k views

How do I get started with GIS Servers on Amazon EC2?

Are there any tutorials, talks or presentations that discuss the use of EC2 or other cloud computing services to host GIS Servers? Has anyone had any experience in doing it with Amazon's EC2? How hard ...
16
votes
2answers
4k views

How can I find a point inside a polygon in PostGIS?

How can I find a point that is guaranteed to be within a given polygon in PostGIS? I am aware of the ST_Centroid function. However, the centroid is not always within a polygon, see below: ...
22
votes
5answers
8k views

Optimizing osm2pgsql imports for OSM data

I'm currently building an instance on EC2 on which to import the entire Planet.osm snapshot of the whole Earth's worth of data for some projects we're working on. I've spun up a large Ubuntu x64 ...
14
votes
2answers
1k views

How can I merge/collapse nearby and parallel road lines (eg. a dual-carriageway) into one single line?

I have a shapefile from OSM which contains all the roads within a city. Larger roads (like dual-carriageways) seem to have 2 parallel lines. I'd like to collapse / combine those into 1 line so I can ...