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

learn more… | top users | synonyms

4
votes
2answers
1k views

I want to edit corresponding postgresql data of a vector from openlayers- how to do it?

I want to edit the corresponding text/numeric data type columns of a vector through openlayres, when a user click/mouse over a vector. like, http://dev4.mapgears.com/bdga/bdgaWFS-T.html# any ...
3
votes
1answer
5k views

How to install PostgreSQL 9.2 with PostGIS 2.0 on Ubuntu 11.10 (or higher)?

I have read this question: Install PostGIS v2 for PostgreSQL v9.2, but it didn't resolve my problem. I added the PostgreSQL backports PPA and installed the postgresql-9.2 package, but there is no ...
6
votes
2answers
301 views

postgis, extrapolate a line

I'm trying to extrapolate from a line segment to find a point on the line but a 3rd of the way 'back', i.e. trying to find point new, given points A and B below: Given a line, I can interpolate it ...
5
votes
1answer
1k views

How to import GeoTIFF via postGIS into GeoServer?

As a simple test case, I'm trying to configure the software stack of OpenGeo such that I can display a GeoTIFF as an overlay to a normal map like OSM. So I perform the following steps: Create a ...
1
vote
2answers
822 views

How to select all points within a circle in PostGIS?

I have set of points in a PostGIS Table (Type Geometry). Now, I need to filter points that lie in a circle with a center (C) and radius (R)! I expect C to be of type Point or Coordinates.. R to be ...
1
vote
1answer
819 views

psycopg2 error with QGIS 1.5

So I just installed QGIS 1.5 using the windows installer not the osgeo4w one and now any plugins that need access to PostgreSQL databases don't seem to work, they all throw a: "Couldn't import Python ...
7
votes
1answer
373 views

How to render a table with mixed geometry types in QGIS?

I created a table with geometry type "GEOMETRY" AND inserted data of point, line and polygon type. My question is how to show this spatial data Qgis not supporting for geometry type "GEOMETRY".
5
votes
1answer
2k views

Install PostGIS on Ubuntu 12.04

I am trying to install PostGIS on Ubuntu 12.04 and I think everything is installed correctly except for postgresql. I followed this post. I get the following error and nothing I do seems to satisfy ...
3
votes
2answers
271 views

What is this PostGIS query doing to show great circle connections?

I'm trying to draw a flight map in CartoDB. My starting point is a single lat long point. We'll pretend it is this: ST_GeomFromText('POINT(-71.060316 48.432044)', 4326) And I want draw lines ...
3
votes
2answers
3k views

How to display a PostGIS table on Google maps?

I am attempting to take a shape file and display it on a map: I can do something like this: SELECT ST_AsText((ST_Dump(the_geom)).geom) as the_geom FROM shapes; But the problem is I still have to ...
1
vote
1answer
100 views

pgrouting unexpected output

Thats my ways.shp file. I loaded this to PostgreSQL DB using PostGIS shape file loader. I ran pgr_anlayzeGraph() on it and found it had a lot of isolated segments. Next I ran pgr_nodeNetwork() to ...
-3
votes
1answer
69 views

Is it possible to access geoserver wfs layer from localhost:8080 in to web application? [closed]

I want to add a WFS layer. I am trying to get WFS layer from localhost:8080 geoserver. but I am getting eoserver DateLineWrap in Openlayers.js file...
25
votes
3answers
8k views

Best GIS system for high performance web application - PostGIS vs MongoDB

I am working on a web/mobile application based on location data. Since i am already familiar with MongoDB, i found the geospatial indexing of mongo is quite suitable for my needs. As i am mainly ...
12
votes
1answer
1k views

Open-source GIS implementation of the Huff model

This might be a stretch, but I was wondering if anyone implemented gravity modeling tools or scripts for Retail Market Analysis (like the Huff Model), to analyze spatial data for customer-store ...
16
votes
3answers
3k 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 ...
13
votes
4answers
3k views

Simplifying adjacent polygons

I encountered a problem simplifying set of polygons that are adjacent. If I simplify each polygon separately with the Douglas–Peucker algorithm (which is used by many open source tools), the resulting ...
10
votes
3answers
3k views

Which is the best way of working with PostGIS data in R?

I work with R almost all the time, and now I am using it for doing spatial data mining, but I have this question: I have a PostGIS database with (obviously) GIS data, If I want to make statistical ...
15
votes
2answers
5k views

How to change the geometry type from Point to Multipoint within an existing table in PostGIS?

Is there a PostGIS function that can change geometry type for an existing table? We need to change from POINT to MULTIPOINT. The table will be empty when we change the geometry type and we cannot ...
11
votes
3answers
2k views

Optimizing a nearest neighbor calculation using PostGIS

I'm using PostGIS to calculate the nearest neighbors of polygons. What I want to calculate is the minimum distance from each polygon, to the nearest polygon. Thus far I have got great help from Mike ...
10
votes
2answers
2k views

How do you display related records in QGIS?

Coming from an esri background I have always used relationship classes in a gdb to display records related to a feature. Eg. Relate 1 survey point to many documents, photos etc. Does any one know how ...
13
votes
5answers
401 views

What in-depth spatial database systems tutorials exist?

Is there a good tutorial that explains in depth the internals of a GIS and a spatial database system such as PostGIS with examples and without any background assumption? I'm specifically looking for ...
13
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 ...
12
votes
6answers
10k views

How can I enable Shapefile GUI Loader in pgadmin3?

I have installed PostgreSQL 9.1 with PostGIS 1.5.3 on Ubuntu 11.10. I also installed pgadmin3 1.14.0-beta1, following this instructions. If I remember correctly, when I installed PostGIS on Windows ...
7
votes
3answers
2k views

How to insert a GeoJSON polygon into a PostGIS table?

I need to insert a polygon from GeoJSON to my PostGIS table. This is how the SQL query looks like. INSERT INTO tablename (name, polygon) VALUES ( 'Name', ST_GeomFromGeoJSON ( { ...
29
votes
2answers
1k views

What coordinate system should be used to store geography data for celestial coordinates?

I am doing an astronomy project. I want to have the information about our images stored in a spatially enabled database. This, I would think, should be a very easy special case for GIS functions ...
19
votes
3answers
2k views

Meaning of Simplify's tolerance parameter

The standard parameters of Douglas-Peucker's simplify algorithm are geometry and tolerance (e.g ST_Simplify in PostGIS). What's the meaning of the tolerance parameter? I know that the bigger the ...
7
votes
1answer
1k views

One to Many Relationship in QGIS with PostGIS

Does anyone know of any tool that can do a One-to-Many relationship in QGIS. I have my data in a PostGIS database. I would like to be able to query spatial layers that are related to spatial or non ...
6
votes
1answer
494 views

Filling a polygon with lines using Postgis

i need to calculate a specific distance in an area. The distance is calculated from parallel lines in a polygon, And i need to find out how many parallel lines (with x meters distance to each other) ...
6
votes
4answers
2k views

Point in polygon algorithm for multiple polygons

I've a Google map with bunch of polygons on it. Here is a problem I'm interested in: Given a lat,lng point, what's the best way to determine all the polygons that this point lies in? The obvious way ...
5
votes
1answer
3k views

How to create a table from existing tables (applying new schemas) in postgis DB?

I have a table that is geospatially enabled; that contain world borders. I want to break it down to different schemas (global, europe etc..) . My thought is to use use something that looks like this: ...
5
votes
2answers
2k views

Using OpenLayers (with OpenStreetMaps) and PostGis for rendering data acquired from GPS tracking device?

I'm researching and planing to acquire data from GPS device and store them in postGIS database, then use geodjango to process/work them out and finally chart them on a map with OpenLayers. Will these ...
17
votes
5answers
3k views

How do you best deal with data that spreads across UTM Zones?

I have data that spreads across two UTM Zones GDA/MGA94 UTM Zone 55 and 56. I have layers such as a cadastre, roads, pipelines etc where I want to store measurements like lengths and areas in metres ...
14
votes
4answers
4k views

How to create a circle in PostGIS?

I'm using PostGIS 1.5.2, with geometries in SRID:900913. I need create a circles using a list of points as centre, with a radius of 600 kilometers. I'm using this query: INSERT INTO circles (geom) ( ...
7
votes
3answers
360 views

Is there a paid service for accessing a PostGIS/OSM DB

I want to render a world map with mapnik and postgis, but do not want to set up my own DB, because the needed hardware and processing time for the OSM import make it nearly impossible for me. I just ...
6
votes
1answer
621 views

What is a “non-noded intersection”?

Can someone provide a precise definition of what a "non-noded intersection" is? There are various GIS platforms and toolkits that have errors with this text, and Google search results for this tend to ...
6
votes
2answers
6k views

Adding shapefiles to PostGIS database

I was able to create a Postgresql database and then I executed, createlang plpgsql geospecies psql -d geospecies -f postgis.sql psql -d geospecies -f spatial_ref_sys.sql So now can I directly ...
5
votes
1answer
3k views

How to import a raster into PostGIS?

I'm trying to follow the instructions here to load a raster into a PostGIS database: python raster2pgsql.py -s 4269 -I -r *.tif -F myschema.demelevation -o elev.sql I understand that I replace * ...
10
votes
3answers
1k views

How to interpolate GPS Positions in PostGIS

I have a PostGIS table of GPS positions for every five seconds: 2011-01-01 00:00:05, POINT(x1,y1) 2011-01-01 00:00:10, POINT(x2,y2) 2011-01-01 00:00:15, POINT(x3,y3) ... I'm looking for a query ...
9
votes
1answer
2k views

Merge Multiple Tables into a New Table in PostGIS

I am looking to merge a number of individual tables into a new table in PostGIS. This is an easy task when working with Shapefile data, but I am unsure how to do this in PostGIS. Any help would be ...
7
votes
4answers
280 views

Is there a way to identify and remove similar GPS tracks in PostGIS or ArcGIS?

I have a large number of GPS tracks from a number of different users. I'd like to identify tracks that take the same route and remove those duplicates. For example, a user takes the same streets from ...
6
votes
6answers
1k views

How to calculate the maximum distance within a polygon in x-direction (east-west direction) in PostGIS?

I am interested in the maximum width of a polygon, e.g. a lake, in the east-west direction. Bounding boxes will help only in simple polygons but not in complex concave polygons.
6
votes
3answers
759 views

Retrieve polygon smallest MBR

I have a postgis table containing polygons. I want to transform my polygons to 4 points polygons : retrieve the smallest MBR. Here comes an illustration of what I want : My original polygon is ...
5
votes
3answers
7k views

How to convert MultiLinestring to Linestring?

I have a multiline string and want to convert it to a linestring in order to use some functions that only work with linestrings. I used ST_Dump() and got a collection of my geometries. If I merge them ...
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 ...
3
votes
3answers
834 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
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
2k 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
1answer
394 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 ...