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

learn more… | top users | synonyms

6
votes
2answers
627 views

How to get an array of simple lines from one multipoint linestring in PostGIS?

How can I extract some LINESTRING consisting of 3 or more POINTs to several LINESTRINGs each of 2 POINTs in PostGIS?
5
votes
4answers
2k views

PostGis ST_Transform: failed to load NAD27-83 correction file (-38)

So I'm getting some user drawn polygons in WKT with OpenLayers. (Web Mercator CRS) and I now need to now convert it to SRID4326 so can do some spatial queries. However, when it fails to do a ...
1
vote
4answers
740 views

Failing to build PostGIS on OS X 10.7 Lion

I am trying to install postGIS from source to match the default install of postgreSQL on OS X 10.7. I installed GEOS and PORJ.4 from Kyngchaos and ran $export MACOSX_DEPLOYMENT_TARGET=10.7 $export ...
4
votes
2answers
474 views

Invalid Geometry Error after ST_ConvexHull

I've a Postgis table of around 80,000 points and want to be able to populate a second table summarizing the data with convex hulls based on points with a common attribute. For example, the data ...
5
votes
1answer
694 views

Split edges at intersections in PostGIS

I'm attempting to do a walking distance analysis using OpenStreetMap data (osm2pgrouting) and PostGIS and following underdark's blog posts, however I need to exclude residential and service roads that ...
4
votes
3answers
2k views

Newbie PostGIS Geometry and Multilinestring Clarification

I'm having some trouble figuring out if I've got the right data loaded for PgRouting. Using the bash script included in PostGIS 2.0, I loaded Tiger2010 data for U.S. State California. The edges ...
2
votes
2answers
3k views

Getting a Bounding Box in Latitude / Longitude using PostGIS shp2pgsql

Using the PostGIS shp2pgsql -s 4326 ... I generated the sql file and created my spatially enabled table. When executing my query: select box2d(ST_extent(the_geom)) from feature_data; I'm returned ...
1
vote
1answer
228 views

Lambert cylindrical projection support in PostGis

Does PostGis support Lambert cylindrical projection or is there a way to add support for it? I'm probably searching the wrong terms, but google isn't bringing up anything useful. Any help is ...
4
votes
2answers
415 views

Does PostGIS not work with psql?

I have a sql script that creates several tables, a trigger, and a trigger function. All the commands work in pgAdmin when I execute them in the "Query" section. My goal is to put all these commands ...
6
votes
3answers
1k views

Can Polygons be generalized to MultiPolygons in GeoDjango?

I set up a model with models.PolygonField in geodjango, using postgres as database. I try to import shp into postgres. The problem is, shp (compiled with QGIS) mixes polygon and multipolygon, hence it ...
7
votes
2answers
3k views

What is the best way to do reverse geocoding with PostGIS?

Is there a way to do reverse geocoding with PostGIS? There's a lot of information on the Web but I found it very confusing... I have imported osm data into my own Postgres with PostGIS database. Now ...
13
votes
4answers
1k views

Database design: road topology in GIS

Is there a standard or a best practice way to store certain features about roads: Road directionality: One way streets: Roads going in one direction only Center Turning lanes: roads that exist ...
1
vote
1answer
141 views

Get relative north aligned point 2163 (US Equal Area)

What I'm trying to do is create a grid where the y axis is north aligned. I have a origin Lat/Lon point which is the bottom left corner of the grid and each cell should be 100 by 100 meters. So I ...
1
vote
1answer
981 views

How to connect GeoServer with Java to a PostGIS/PostGres database?

I am having trouble using GeoServer to perform a shortest path analysis between two network points. My question is about connecting GeoServer with Java to a PostGIS/PostGres database. I know that in ...
3
votes
1answer
263 views

How to mix coordinate systems in GeoDjango?

This is a beginner question about working with different coordinate systems in GeoDjango. I've got a GeoDjango object with a polygon field, stored as OSGB coordinates: class Region(models.Model): ...
3
votes
1answer
2k views

PostGIS Error: type “geography” does not exist

I just upgraded my development machine to Windows 7 and am therefore reinstalling PostgreSQL and PostGIS. I used the Postgres Plus installer, as recommended on the Postgres website, and followed this ...
6
votes
2answers
740 views

What does 'building topology' mean for pgRouting?

From a couple of answers at gis.stackexchange.com and at the pgRouting mailing list I have found out that pgRouting 'builds topology'. What does that mean? If for example we import an .osm file into ...
8
votes
2answers
927 views

How to preserve topology while editing polygons in OpenLayers?

I’m facing this issue: I have a chloropleth map based on a set of polygons with some data. Using WFS-T (postgis, geoserver, openlayers) I am able to edit the geometry of the polygons. This works fine. ...
5
votes
1answer
463 views

Promotion radius in miles around venues using PostGIS

Bear with me as I'm new to PostGIS and GIS in general. I also don't know the domain well enough to create a good title for this post! Here is what I'm trying to accomplish: I have Venues in my ...
7
votes
2answers
306 views

PostGIS uuid type not visible in QGIS or GeoServer

This is probably a simple question, but nothing comes to my mind right now. I have created a view in PostGIS containing multiple columns, including one column of data type uuid. When I try to ...
2
votes
1answer
378 views

Is it possible to add custom SQL-based layers in GeoServer?

I would like to add a layer to GeoServer that builds its features from an SQL query executed against a PostGIS database (something like a PostGIS layer in QGIS, but customized with additional SQL ...
5
votes
2answers
1k views

Why does GeoServer/OpenLayers show only points from my PostGIS?

I am reading the PostGIS in Action book now and I have a problem with one example: I have created a table: CREATE TABLE my_geometries (id serial NOT NULL PRIMARY KEY, name varchar(20)); I have ...
4
votes
2answers
857 views

Which is the best way to store roads for the shortest path finding application?

I would like my application which is simply a shortest path finder in a city to meet the following requirements: the city roads network should be stored persistently on disk and loaded into memory ...
14
votes
7answers
2k views

How to migrate data from ArcSDE to PostGIS?

Its been suggested that i ask this question again, but perhaps worded differently than how to Bulk load multiple shapefiles into PostGIS. I'm new to postgis and sql but i want to use postgis as a ...
5
votes
2answers
819 views

Practical way of managing polygons and unions of them

I have a table in PostGIS with a quite fine partition of a region, which I'd like to dissolve at two higher levels by means of two foreign keys (e.g. municipality and state). The partition is a real ...
11
votes
2answers
501 views

How to clean such a bad shapefile for routing ?

I am trying to clean a shapefile to make it usable for routing with pgrouting, postgis, postgresql. Here an intersection, it seems to be connected but when we zoom …. It is not: Same here : ...
5
votes
1answer
569 views

Memory leak in ArcGIS aggregate points/buffer/Addfield/cursor

I am starting to have concerns about the ability of ArcGIS 10 to fulfill a deliverable of mine. It got me to wondering what exactly else there is, that can perform similar functionality? ET ...
2
votes
1answer
552 views

Postgis: WGS84 Lat Lon Point to Gauss-Kruger 3

How do I convert a WGS84 lat lon point in postgis to Guass Kruger 3 (31467)? Somehow, I do not seem to get it right. I tried the usual way for converting projections: ...
6
votes
2answers
860 views

How to read data from PostGIS in DotNet (VB.Net/C#)

I have stored my data in PostGIS (PostgrSQL). Now I want to read the data in DotNet ArcEngine Application using VB.NET/C#. Anyone know how to read the data from PostGIS in .Net? Regards
1
vote
2answers
393 views

bulk upload shp to postgis [duplicate]

Possible Duplicate: Bulk load multiple shapefiles into PostGIS Is it possible to bulk upload shp files into postgis. Im currently playing around with postgis, qgis and geoserver (as a ...
7
votes
1answer
366 views

Get all Nodes from a List of adjacent LineStrings in PostGIS

I use PostGis and pgRouting. I have a table with geometries of the adjacent edges returned by a shortest path query. I want to concatenate these edges and retrieve a list of all nodes these edges ...
11
votes
1answer
767 views

Snap line layer to network in QGIS or PostGIS

I have GPS data I've taken of bus routes, and now I'd like to snap it to my road network. Both layers are line layers in a PostGIS DB. I'd like to use either QGIS or PostGIS, but if I have to go with ...
6
votes
1answer
3k views

How do I get a route between two points using PgRouting with TIGER2010 Data

A little background: I've got PostGIS 2.0 and all the TIGER2010 data loaded for a U.S. State California. I've got a table with points stored as data type geometry. I've learned enough to get the ...
20
votes
3answers
2k views

When should you NOT use a spatial index?

I am asking this because I was mainly working with Oracle but for the past year I've been doubling with PostGIS and SQLServer 2008. Most spatial functions in Oracle won't work without a spatial index ...
6
votes
1answer
1k views

Performance Gain Through GIST Index for Point in Polygon Query

I have two tables: locations(id,region_id,the_geom) and regions(id,the_geom). For each location point I want to determine the region it is located in: UPDATE locations SET region_id = (SELECT id ...
13
votes
6answers
7k views

How to use ST_Intersection?

Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
2
votes
1answer
831 views

GeoServer converting PostGIS timestamp with time zone

In a PostGIS view i have a field of data type "timestamp with time zone". In GeoServer this field is show with datatype "Timestamp" My problem is that i want the Timestamp to be show in my ...
18
votes
5answers
1k views

How to simplify a routable network?

I have a network graph that I need to simplify in the sense of reducing the number of edges. The idea would be to merge nodes that are located close together and remove the connecting short edges. ...
6
votes
1answer
5k views

How to convert a String to OpenLayers.Geometry.Polygon using javascript?

First let me say that I'm using Javascript, jQuery, Java, GeoServer, OpenLayers and PostGIS. Using java class ResultSet I return this String: POLYGON((516000 2135000,515039.264020162 ...
2
votes
0answers
249 views

RT Sql Layer plugin giving an error [closed]

I am trying to use the aforementioned plugin with QGIS 1.7 and Postgres 9.0/PostGIS 1.5. Added a PostGIS spatial layer w/out a problem and then clicked on the RT Sql layer button which displayed the ...
5
votes
1answer
2k views

Calculate distances between series of points in postgis

I have a postgres/postgis table containing a series of sequential points. I want to add a new column to the table which contains the distance between each point and the first one, and so forth until ...
1
vote
1answer
289 views

Building orientation and simplification using Opencarto Java library

I need to find out orientation of buildings and perform simplification of sides of buildings with a tolerance. I came to know from StackExchange that OpenCarto has useful libraries for geometrical ...
3
votes
2answers
526 views

Updating Apps on OpenGEO suite Community Edition

I would like to update PostgreSQL and PostGIS on Opengeo CE to a newer version, maybe the other apps too (geoserver, openlayers, etc). Can it be done? Can someone point me the right direction? ...
5
votes
3answers
1k views

How can I display with OpenLayers the geometry returned from a ST_Buffer in POSTGIS?

Im using PostGIS, GeoServer and OpenLayers, and the thing is that i want to display the geometry result from a query like this: SELECT ST_Buffer(ST_GeomFromText('POINT(100 100)'), 500); To perform ...
4
votes
1answer
219 views

PostGIS Query: All rows within 1 hour of each other which intersect

I'm using postgres (postgis) and i want to perform a query that returns all rows which geometries intersect and have a timestamp within 1 hour from each other. What would the SQL statement look like? ...
3
votes
2answers
525 views

PostGIS + pgRouting: Adding dummy links to a road network and performing routing analysis

I'm a beginner when it comes to postgis and pgrouting development. For a project I'm working on and a bit of the algorithm: I have a polygon layer that represents zones I have a line layer that ...
17
votes
3answers
4k views

In PostGIS is it possible to create a View with a unique ID?

When I create a view in PostGIS is there any way to add a unique ID to that view? Just like the "gid" field in any other PostGIS table? Edit: Sorry I should have included this in the original post. I ...
2
votes
1answer
106 views

Temporary additions to OSM data

I'm planning on building a transportation related GIS App. In the app, users will be allowed to add their own links to the network. For example, let's say a user wants to add a "driveway" in front of ...
7
votes
2answers
3k views

PostGIS: Find points that lie within a set of coordinates

I have a PostGIS db, and I want to find the points that lie within some region (a bounding box). I have two sets of coordinates, from which I can get all four rectangle points that form the box (if ...
2
votes
1answer
805 views

How to extract data from a POINT column in PostGIS using JAVA (jdbc)

How do you get a value from a column which has a point data type. I've just switched over from MySQL to PostGIS. I have a column which is called point and is of type Point. I want to get that value ...