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

learn more… | top users | synonyms

1
vote
1answer
457 views

How to alter this PostGIS ST_distance_sphere query to give the answer for all points in the table, not just one?

I have the following query which returns the expected result for a single point. I would like to alter this query to return the answer for every point in the table. SELECT count(case when( ...
5
votes
1answer
1k views

How to speed up an st_intersects() query?

I have a "huge" spatial database: 72GB, 200 millions documents with geometries (points) I have a GIST index on the geometries the database: CREATE TABLE resources ( id bigint NOT NULL, accuracy ...
6
votes
1answer
677 views

How can I snap lines in PostGIS?

I have a few linestrings that together form a long line. The start- and endpoints of the linestrings are equal with their direct neighbour, but when tested the ST_Distance between any 2 lines is like ...
2
votes
1answer
255 views

GeoDjango / PostGIS - Cut geometry by bounding box

I am looking for a solution to retrieve the geometry(ies) from a polygon/multipolygon within a bounding box in a GeoDjango application. The application I am developing has a requirement to serve out ...
0
votes
2answers
342 views

error while loading osm2po routing sql-script into PostgreSQL

please advice what could be wrong in my situation: I succesfully generated sql-file using osm2po I tried to run it within PostgreSQL and got the following error: ********** Error ********** ERROR: ...
6
votes
2answers
1k views

Storing GPS tracks with timestamps in PostGIS

I need to store a series of GPS points with timestamps in the database (traces of various vehicles). I am wondering which of two approaches to choose for storing them in the PostGIS table: 1.) Each ...
1
vote
0answers
360 views

working with multiple wfs-t layers

I am using multiple wfs layers and using editing tools in that like edit,draw,save etc. The code is shown here...... var district = new OpenLayers.Layer.Vector("district(wfs)", { ...
1
vote
0answers
101 views

postgis union geometries in consecutive order

Database is postgres 9.2, POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8" i have geometries in consecutive order. Here is query: SELECT ...
7
votes
1answer
697 views

Is there a significantly faster way to buffer than arcmap? [duplicate]

I hope this question is appropriate here and I apologize if it is more of a discussion question than a specific technical problem. I have to buffer 150,000 polygons for a real estate project. While ...
3
votes
1answer
263 views

Geoserver, PostGIS and KML: Creating clickable nodes from OSM data

I have a PostGIS database that has OSM data imported into it using osm2pgsql and I'm using GeoServer to plot the points into a networked KML file for Google Earth. What I'd like to do is make the ...
2
votes
0answers
34 views

Automatic insert of project name into database

For every layer I've a field in my postGIS database that should be filled with the name of the current project and today I do this manually. Is there a way to do this with the Commands that can be ...
1
vote
0answers
108 views

Postgis walk through multilinestring

Maybe question title not correct, i have no idea how to formulate my question. Database is postgres 9.2, POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.7.1, 23 September 2009" ...
4
votes
2answers
274 views

Connect to PostGIS using SEXTANTE in QGIS

I have a localhost PostGIS database that I would like to use with SEXTANTE in QGIS. I can connect to the database just fine using "Add PostGIS layers...", but when I try "PostGIS execute SQL" in ...
0
votes
0answers
539 views

QGIS 1.8.0-Lisboa DBmanager (OSx) can't connect to remote PostGIS 2.0.2 database (Debian)

The PostGIS database is remote but I have made changes to the Postgresql config files and can access it remotely via pgadmin. When I open DBmanager in QGIS I see a note on the bottom that says ...
8
votes
2answers
541 views

How to avoid duplicate GIDs when copying features from one PostGIS layer to another?

When I enter new elements (features) in another Postgres layer, I can do it in two ways: Drawing new element(s) (with 'Add feature') which I do rarely or Copying (or cutting) some elements from ...
0
votes
1answer
201 views

Postgresql on Ubuntu Server and QGIS [closed]

Complete newbie... I taught myself the basics of GIS on the job with ArcGIS 9.3. I have been plating with QGIS and have gotten the basics down on both. I am not well versed in the terminology related ...
1
vote
2answers
716 views

Function for Selecting Points in a Polygon

I've been banging on this for a few hours, but since I'm relatively new to PostgreSQL and PostGIS, I can't find the solution. I'm trying to create a stored procedure (function) which will return all ...
4
votes
1answer
650 views

How to import ECW into my postgis database with raster2pgsql (windows)

I'm working on windows 7 64 bits, postgis 2.01. I have to import ECW files into my postgis database. Unfortunatly, my postgis seems to has been compiled without gdal ecw support.When i do a ...
4
votes
1answer
155 views

QGIS field calculator and Postgres permissions

I’ve given user x the following GRANT ALL ON ALL TABLES IN SCHEMA y TO x; GRANT ALL ON ALL SEQUENCES IN SCHEMA y TO x; GRANT ALL ON ALL FUNCTIONS IN SCHEMA y TO x; However in QGIS they dont have ...
5
votes
2answers
1k views

Fastest way to convert shapefile to postgis in java

I have been using geotools to read shapefiles and import them into postgis. Unfortunately, when large files are being imported, this leads to a massive lag time --8000% of shp2pgsql piped into pgsql-- ...
2
votes
3answers
816 views

Postgis st_intersects fails on an obtained point on the line with the line itself

I am trying to split a line from its intersection with another line. I know I can use st_split directly here but I wish to split a line from several positions where it intersects other lines. What I ...
3
votes
1answer
262 views

Given a lat/long point, determine if it's land or water?

I have a PostGIS-enabled PostgreSQL 9.1 installation with the 10M physical dataset from Natural Earth imported. It's been converted to 900913, and in QGIS I can visualize the data. So the plumbing's ...
1
vote
0answers
132 views

Are there limitations with gdal virtual raster option?

I am new at Postgis and I'm groping... I pretend to rasterize some weighty vector layers in Postgis, do some map algebra and reclassification with them and visualize intermediate as well as final ...
2
votes
1answer
169 views

Keep .gdb structure to postgresql + PostGIS (Feature dataset)

I have a .gdb file with a specific structure. I will extract all shp files for uploading to a postgtresql db. But I want to keep the structure of gdb. How can I keep this structure to ...
0
votes
1answer
166 views

How to find features within a distance? [duplicate]

I insert the values from lat/long into the points. Those users move around and send me new Lat/long and of course , I made an update of the position. I need to find people that are in a distance ...
5
votes
2answers
9k views

How to connect OpenLayers to PostGIS data?

I have read in OpenLayers how to load KML, GeoJSON etc. vector files in OpenLayers. But how can I connect to PostGIS data. If not, why should I upload my data to PostGIS then instead of directly ...
3
votes
4answers
2k views

Calculate min distance between points in PostGIS

I have point layer in PostGIS database. Help please with query which add for each points in layer distance in attribute table between this point and another nearest point. Thanks! Update Calculate ...
2
votes
2answers
157 views

check postgis point geometry

I originated some points with incorrect geometries (ex: 1432.33 , 900.2 for EPSG4326) because lat/lon in data source where also incorrect. How can I detect in the_geom these incorrect ones? I ...
1
vote
1answer
385 views

How to create routable network by pgrouting with assign_vertex_id?

I'm trying to create the routable network as per http://underdark.wordpress.com/2011/02/07/a-beginners-guide-to-pgrouting/and use assign_vertex_id. Do I still need to create the node table? How would ...
0
votes
1answer
247 views

Get lon/lat of feature in postgis

I'm hava a problem I have a point layer (shapefile) insert to postgis! I'm using MapServer and OpenLayer to display layer on map! Now, i want get lon/lat all feature of layer! Hope somebody can help ...
5
votes
3answers
785 views

Adding a GIS feature to existing database entry with QGIS

I've built a database with postgreSQL with tables, which include geometry columns. When I add some data to my non-geometry columns, I can see them in QGIS when I connect to my database using postgis. ...
1
vote
0answers
607 views

How to merge linestrings which are connected with each other?

I would like to join linestrings which are connected to each other. The preferred output is a longer linestring based on all joined single linestings! The table that holds my single linestrings is ...
4
votes
1answer
476 views

Delete points outside a polygon with PostGis

I have to use PostGis because I have a very large database (more than 7 000 000 lines), but I am not used to work with PostGis; and since days, I would like to do that: Select and then delete all ...
4
votes
1answer
173 views

ST_Buffer won't accept bevel join styles (always displays as round)

I'm having a bit of trouble with ST_Buffer and join styles. Basically, if I try and use the bevel style it outputs as if I was using the round style. I notice that the ST_Buffer docs state that GEOS ...
3
votes
3answers
605 views

Visualization of a big graph in 3D from postgresql/postgis

We have a graph in 3D in a PostgreSQL/PostGIS database. It contains something like 50'000 edges and 50'000 vertices, with x-y coordinates and floors. We would like to visualize this graph with ...
1
vote
2answers
217 views

How to install postgis2.0 on Debian

How to install postgis2.0 on Debian6.0 and with Postgressql9.1 ? Didn't find any good repository ? Do you have to go all the way and compile ?
0
votes
0answers
80 views

Can I edit non geographic tables in geoexplorer?

I'm using postgis, geoserver and geoexplorer to manage my data. However I would like to edit non geographic tables in geoexplorer and edit a field feature based on other tables using a drop-down menu. ...
2
votes
1answer
120 views

Which is better for storage? Geometry column or varchar?

Objective: Need to store and retrieve a list of geometries from the database. Basically these are drawn by the user using OpenLayers which I would like to save and present again as a list (kind of ...
2
votes
1answer
539 views

Creating routable network table in PostGIS

I am trying to create the routable network table, as per http://underdark.wordpress.com/2011/02/07/a-beginners-guide-to-pgrouting/. Everytime I do it in PostGIS extension, QGIS crashes. The area is no ...
2
votes
1answer
373 views

Postgis shapfile and DBF loader 2.0 problem windows

I am trying to import a shapefile with polygons into Postgis (Windows 2008 server). If I import 100 polygons it works fine. If I try to import the full map of 8,100 polygons, about halfway I get an ...
1
vote
1answer
196 views

Is it possible to import Openlayer data to PostGIS?

I'm struggled with the following problem: I'd like to import an Openlayer Layer to PostGIS in order to have the layer information for each grid point in a table. I know how to create a layer from ...
5
votes
2answers
2k views

Automating batch load of multiple GPX files into PostGIS

I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, ...
3
votes
1answer
144 views

OpenGeo Suite PostGIS Data Location

I have OpenGeo Suite installed on a server. I want to have the PostGIS data stored on a different drive (D) on the server instead of on the C drive under my username. How do I do this?
5
votes
2answers
2k views

How to install PostGIS on Linux Mint 14?

I am trying to install PostGIS on Linux Mint 14 KDE. First thing I tried was to install PostgreSQL using "sudo apt-get install postgresql". I was successful doing that. I then did "sudo apt-get ...
1
vote
1answer
106 views

Point of intersection issues with PostgreSQL/PostGIS?

I have a table containing a set of points of intersections. Most of the roads intersects whith just one road BUT i have some roads which intersects with two, therefore three different point of ...
2
votes
2answers
176 views

Is it possible to use PostGIS on gisgraphy database?

I have the entire gisgraphy database inside my server. Is it possible to use PostGIS on it to query such as "get locations within 10 miles from this coordinate"? I tried reading about spatial queries ...
1
vote
1answer
129 views

Problem loading raster to PostGIS using QGIS

I am having trouble loading a raster (.asc) file to PostGIS 2.0.1 using the plugin Database - PostGIS Raster - Load raster to postgis in QGIS 1.8.0 on Win Vista 64 bit. I get the following error ...
1
vote
0answers
223 views

Break LINESTRING values in postgis into mutiple LINESTRINGs

Figure A below is the visual representation of what i have in my road data set. Line 1, Line 2, Line 3 in illustration are each represented as 1 row postgis DB inside a geometry column, some of these ...
4
votes
4answers
590 views

How can I create polygons of the area surrounded by roads / lines?

I'm currently trying to create polygons that represent the areas surrounded by roads. The roads are stored in PostGIS as points / lines so I have flexibility over what I can do with them. I'm ...
3
votes
2answers
181 views

Traversing a PostGIS table tree

I'm developing a geospatial db for a company that operates at a number of large facilities. Its primary purpose is to help staff locate themselves and equipment within each facilities' multi-storey ...