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

learn more… | top users | synonyms

3
votes
1answer
875 views

Postgis: Is there a way to do an intersection query based on lines while taking into account the dateline?

This is an exact copy of a question I asked on Stackoverflow a few weeks back and still haven't found a good answer for it. The original question is from here: original question. I've been searching ...
3
votes
4answers
2k views

Migration from postgresql 8.4 to postgresql 9.0, postgis 1.5 involved

Im migrating from 8.4 to 9.0, in pg8.4 i have postgis 1.5.1 and in 9.0 im just installed 1.5.2. I decided to dump the postgis databases before the pg_upgrade command, and delete them, planning to ...
11
votes
1answer
9k views

How to convert/typecast from Polygon to Multipolygon in PostGIS?

Is there any way to typecast Polygons to Multipolygon type? For example, I have created a circle using ST_Buffer() on a point. The return type of that function is of Polygon type. The problem is that ...
4
votes
3answers
184 views

Math module VS PostGIS

I have a simple (and maybe stupid) question for you today. I have to compute intersection points between GIS polygons and imaginary lines I draw thanks to a script of mine... And I wonder if it would ...
1
vote
1answer
3k views

Problem inserting Geometry into PostGIS Table

I am new to Postgis and I have imported a shapefile containing point layer into the postgis, and the SRID i had chosen was 4326. now while inserting the values into the table I am getting problem. My ...
2
votes
2answers
495 views

Parameterized insert query to PostGIS fails

I have a PostGIS database table that I need to insert data into. I'm using Python 3 and the pg8000 interface to Postgres. Somehow, parameterized inserts do not work. If I do iq="INSERT INTO ...
9
votes
1answer
1k views

How to add features to a PostGIS layer using Quantum GIS?

I am using Quantum GIS and the PostGIS dbms. I am able to call the PostGIS layer into QGIS but i am unable to add feature to it. I am using the method of adding features to a Shapefile but still it is ...
5
votes
1answer
359 views

How to filter points based on proximity while inserting into PostGIS?

I have a large amount of locations that need to be inserted to a PostGIS database. However, I'd like to aggregate these points so that if there's already a location, say nearer than a kilometer, then ...
4
votes
1answer
3k views

Why is my PostGIS query not using a spatial index?

I am having an issue with a spatial query that is not making use of indexes. My schema is: CREATE TABLE geoplanet_place ( woeid integer NOT NULL, "name" character varying(300) NOT NULL, ...
3
votes
2answers
5k views

Geoserver replies HTTP Error 503

I´ve seen this question was asked before but I couldn´t find any solution to the problem. Since today, my Geoserver does not reply on any requests anymore, I can´t even access the Geoserver UI. I ...
2
votes
2answers
234 views

Is there a way to save manual QGIS changes to Postgis to SQL script?

I am manually editing a Postgis layar with QGIS and would like to export these manual changes in the form of an SQL script. This way: I can do it automatically next time i need to it is easier to ...
2
votes
2answers
240 views

File paths in a PostGIS Table in QGIS

I have a PostGIS table which I have stored the location of some viewpoint photographs. I would like to store the location of the photo file in a field, but when I add a file path in the attribute ...
5
votes
2answers
535 views

Reduce Tracking Data Set

I'm building an application that uses data from GPS units on board vehicles and displays it on a map. A lat/long is recorded every .5 seconds and a session can be many hours... this can add up to be a ...
11
votes
5answers
1k views

What is the fastest (performance-wise) way to serve PostGIS features?

I'm interested in the fastest way to serve PostGIS features. I can find several WMS improvements and alternatives (MapProxy, TileCache, Mapnik...) but not so many WFS Open Source improvements and ...
2
votes
1answer
236 views

exporting lat/long points from shp file gives crazy results

i downloaded a shape file from the dept of city planning of NYC I use shp2pgsql to create a table (nybb) I use http://prj2epsg.org/search to determine my srid is 2263. which i then set. select ...
15
votes
4answers
5k views

How to create a simple front-end for a PostGIS database?

My organisation collects a lot of environmental monitoring data (stream flow, water chemistry etc.) most of which is currently stored in Excel. I’d like to get everything into a database – probably ...
7
votes
2answers
1k views

Looking for an Android Object-relational mapping programming layer, PostGIS oriented

I'm working on a Android app which should manage data on a remote PostGIS database. Before diving into actual programming, I'm searching for ORMs for Android. I've found a couple, namely androrm and ...
6
votes
2answers
675 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
741 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
490 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
735 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
233 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
425 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 ...
8
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
142 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
1k 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
272 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
763 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
969 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
485 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
310 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
382 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
890 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
865 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
513 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
575 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
577 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
878 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
404 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
370 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
777 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 ...