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

learn more… | top users | synonyms

5
votes
1answer
85 views

How to findout direction PostGIS

I want to find out the direction from the 2 points from postGIS database. Please see the attached image. I want to find out the direction from the mainPt to any point. But want to get the result as ...
1
vote
2answers
106 views

Load information about a feature

I must mention first of all that I am very new to this area... I am developing a GIS application. I created a simple map using geoserver with openlayers, it is all working through apache tomcat - and ...
3
votes
3answers
98 views

Bounded box on postgis

I have a few MULTIPOLYGON geometries that are very complex to work with, and I need to find POINT geometries from a ~40M rows that are inside these MULTIPOLYGON geometries. Right now I'm working with ...
2
votes
1answer
89 views

PostGIS ST_Contains question

Here's a quick summary about what I'm trying to do: Let's say I got two layers. One (A) with 10 polygons and one that is more granular with 100 polygons (B). Just to check if the behavior of PostGIS ...
1
vote
1answer
48 views

segment lines according to point using pgRouting?

I'm working on postgresql and I am trying to create table to generate graphs. I have a table that contains all the objects of a city (points) and another contains the city street. My goal now is to ...
1
vote
0answers
103 views

Setting geometry types importing to PostGIS with OGR

I'm using ogr2ogr to import data into a PostGIS database. Each dataset I need to import has (theoretically) the same exact data structure, but it appears that they are not the same geometry types. ...
1
vote
1answer
624 views

Convert latitude longitude coordinate to x y coordinate?

I'm using a postgis database and java to develop my application. I need to transform my geographic data currently in latitude/longitude format into a x/y format. I found solutions based on UTM ...
0
votes
1answer
56 views

Is it possible to define a part of a geometry column as the Primary Key in a PostGIS database?

Is it possible to define a part of a geometry column as the Primary Key in a PostGIS database? For example, when I want to store 3D points in a database, using the x/y coordinate as the primary key. ...
2
votes
1answer
73 views

QGIS, Postgis: Is it possible to create a new postgis layer?

Situation: I have a postgis vector lay that has lots of line segments (the features). I want to create a set of new layers each of which contains a subset of the features of the original layer and ...
2
votes
1answer
38 views

QGIS: Making changes to vector layers stored in PostGIS

I have a vector layer stored in PostGIS. I split several lines in the layer and simplified others by removing vertices. When I tried to save the changes to the layer I got postgres more postgres ...
2
votes
1answer
63 views

st_clip and gdal_translate: “Error browsing database for PostGIS Raster properties” - Why?

Im using shell-script, postgis2.0 and gdal for trying to clip raster apart, using an overlapping raster and a the_geom-object. At first I create a view to clip the overlapping part of the raster. It ...
1
vote
1answer
43 views

why sql file generated by postgis was different in notepad and pgAdminIII?

When i imported a shapefile which contains some polygons into PostGIS by command line on Win 7, a problem puzzled me: The sql file generated by shp2pgsql opened with notePad has the geom ...
6
votes
2answers
76 views

PostGIS Union Between Two Tables, Preserving Attributes

I'm trying to union US State level upper- and lower-level government boundaries in such a way that generates one PostGIS table with both the upper and lower level names for each shape. In my example ...
1
vote
1answer
87 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( ...
4
votes
1answer
158 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 ...
5
votes
1answer
118 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 ...
1
vote
0answers
75 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
80 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: ...
4
votes
2answers
138 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
131 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
37 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
139 views

Is there a significantly faster way to buffer than arcmap?

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 ...
2
votes
0answers
115 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
28 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 ...
0
votes
0answers
44 views

Problem in joined table

I test to join two postgis layers, one geometryc and other without geometryc data. Data are loaded properly in qgis (1.8 in Osgeo4w distribution) and the joins seem been done properly but when i try ...
1
vote
0answers
50 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" ...
2
votes
1answer
118 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
190 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 ...
2
votes
1answer
78 views

PostgreSQL gid copy problem in Quantum GIS

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
94 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
0answers
101 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 ...
2
votes
1answer
116 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
82 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 ...
4
votes
2answers
226 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
123 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 ...
2
votes
1answer
92 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
78 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 ...
1
vote
1answer
55 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
66 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 ...
2
votes
2answers
362 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 ...
2
votes
2answers
193 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
49 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
128 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
109 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 ...
2
votes
0answers
84 views

Adding polygon to existing database column

I've built a database with postgreSQL with a few geometry columns. When I add some data to my non-geometry columns, I can see them in QGIS when I connect to my DB using postgis. Now, I want to add ...
1
vote
0answers
104 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 ...
0
votes
0answers
70 views

Creating maps using Polymaps

We are already working with the TIGER/Line Shapefiles. Now we want to be able to produce maps. Trying out Polymaps made us realize that it makes calls to Cloudmade to get the mapping tiles. Is this ...
3
votes
1answer
97 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
116 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 ...
0
votes
0answers
99 views

How to pass parameter postgres sql to Map file - java

I am new to GIS. I want to pass a parameter map file dynamically. Or how map file fetches the data from the database. I can't find out the solution. This is my map script. LAYER CLASSITEM ...

1 3 4 5 6 7 27