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

learn more… | top users | synonyms

1
vote
0answers
253 views

View PostGIS geometry in QGIS

I am a newbie to GIS systems so please be patient. I have a PostGIS database set up with a spatial data table. One of the columns is of Geometry type and contains Points with SRID 4326. I want to ...
1
vote
1answer
535 views

pgsql2shp error when query is introduced

I'm trying to export a table from PostGIS using pgsql2shp. The basic query to export the entire table works fine using the following format: "C:\Program Files\PostgreSQL\9.1\bin\pgsql2shp.exe" -f ...
9
votes
2answers
3k views

How can I get a shapefile from a postgis query?

My data is in a PostGIS database. I would like to generate a shapefile from a query. How can I do that?
2
votes
2answers
144 views

Is there a way to visualize a convexhull in qgis 1.8 lisboa?

There is no way to visualize a convexhull in qgis 1.8 lisboa? I have tried following views in Postgis 1.5 I was told to use an id column to publish it in Qgis. If you not use an id column, u cannot ...
0
votes
0answers
133 views

QGIS cannot view raster loaded to PostGIS through raster2pgsql

I tried to load a raster GeoTIFF image to a PostGIS database using "raster2pgsql" following the OpenGeo Suite Manual. The command I used is: C:\>raster2pgsql -s 4283 -I -C -M "C:\Program ...
2
votes
1answer
85 views

How to create a buffer zone for notification

I am new to PostGIS. I am working on a project, for this i need to find out abutter notification that generates a list of properties within the buffer zone from the selected property with user input ...
4
votes
4answers
2k views

How to convert multipoint layer to point

I have a Spatialite layer which is multipoint (following a QGIS Save As from shapefile). I need it to be PostGIS and POINT. I have tried ogr2ogr -nlt POINT and got 'new row for relation "xxx" violates ...
2
votes
0answers
109 views

How to Create database using OGC compliant geometries and Custom type Geometries?

I am interested in storing geometry attributes in a PostGis database, so that it would be OGC compliant, along with OGC compliant geometry types like point,line, linestring, etc. I also wanted to ...
1
vote
1answer
321 views

Missing function ST_Extent in PostGIS db

I hope you can help as I am tearing my hair out here. Do any of you elite geo peeps have any idea why some specific functions could be missing from my PostGIS install? I am trying to use Mapnik with ...
0
votes
0answers
71 views

Table for feature layer in PostGIS database cannot be published and enabled on GeoServer

I have tried to publish a table for feature layer in a PostGIS database to GeoServer 2.2.5. The layer was added and published. However, the layer has got a yellow exclamation mark in the "Enabled?" ...
1
vote
0answers
76 views

How to import multiple shapefiles each with different source projections to postgis

I have a couple thousand .zip files each with a .shp, .dbf, .shx, and .prj inside them that I want to load into postgis. The problem is, they have many different source projections (each defined in ...
4
votes
1answer
106 views

What's the best way to run a visibility analysis in PostGIS 2?

I am looking for the best way to run a visibility analysis in PostGis 2, i.e. given 2 points and obstacle polygons, are these 2 points visible from each other ? I did not find anything relevant for ...
1
vote
2answers
568 views

GeoServer Where clause filter

I use postgis, geoserver and openlayers for gis development. I simply reach from goeserver to postgis table or view and show it with openlayers. but I need some filtering operation on my spatial ...
1
vote
1answer
186 views

How to visualize pgrouting query results in mapguide open source

I would like to make a spatial query using postgis 2.0 and pgrouting 1.05 then visualize results in Mapguide open source.Any suggestions?
1
vote
0answers
109 views

Problems combining (union) Multipolygons in geodjango

I'm using geodjango and postgis (1.x), What is the best way to combine (union) a list of multipolygons. in what i assume is rather inefficient i'm looping trough like this combined = multipolygon ...
2
votes
1answer
263 views

Unreachable vertex

I'm developing an application for academic purposes that mainly gives to the user a recommended itinerary for a previously introduced preferences (Gastronomy, Leisure,etc.). For this purpose, I use ...
3
votes
0answers
171 views

building larger polygons from smaller ones *without* a common id in PostGIS

I am looking for a means, using PostGIS, of reconstituting a set of polygons from tens of thousands of smaller polygon 'pieces'. This is a simplified example, with the pieces shaded: Unfortunately ...
0
votes
1answer
124 views

PostGIS Manager Load Error [duplicate]

I am using the PostGIS Manager Load data to PostGIS tool on a Windows install and am getting the following error: Something's wrong: ["'shp2pgsql' is not recognized as an internal or external ...
1
vote
2answers
218 views

geography_columns and geometry_columns purpose

Can anyone tell me what the purpose of the the geography_columns view and the geometry_columns table are used for in a PostGIS database? My geography_columns view is empty so I can't see what the ...
0
votes
2answers
745 views

QGIS: using postgis can I define a layer using sql?

I have a vector layer (call it master) that is stored in postgis and consists of a number of line segments. I also have a collection of sub layers that consist of subsets of the master layer. I can ...
0
votes
1answer
37 views

PostGIS: Querying a record table and explanatory table

Basically I have two tables one containing a collection of records and one table that contains extra info about features in the first. i.e Records Table: GID SITE SPECIES GEOM and the second table ...
2
votes
2answers
227 views

How do I plot data stored in an attribute table (really in a database) in qgis

I have a csv of UK postcodes from Ordnance Survey that looks like SE1 0AA,10,531869,179427,E92000001,E19000003,E18000007,E09000028,E05000536 When I import to QGIS using 'Add Delimited Text Layer', ...
1
vote
1answer
1k views

Count Points in Polygon with Postgis

I've got a simple problem: I want to count the number of points within a set of polygons. I have a SQL already but it only gives back the gid of the polygone that actually contains points. My ...
3
votes
4answers
570 views

converting oracle geometry to postgis with 3d data (wkt?)

I am converting Oracle spatial database to postgis. Most of of the spatial data is 2.5d. Meaning we have a Z-coordinate which indicates the depth/height of the element compared to soil level. Getting ...
1
vote
3answers
714 views

finding the definition of missing srid in postgis

I am converting a spatial Oracle database to POSTGIS, and one of the problems I encounter is that we use SRID in Oracle that do not exist in POSTGIS. I am talking about the following SRID: 90112 : ...
1
vote
1answer
3k views

Make POINT from longitude/latitude coordinates from existing table in PostGIS

I would like to make a POINT using the longitude and latitude columns of an existing table. Here's a link to the documentation of ST_MakePoint. Here's my table: CREATE TABLE sysinst.bio ( oid ...
3
votes
1answer
117 views

How to bulk import ESRI projections into Postgis

Where can I get a file that would allow me to bulk upload all of the ESRI projections into the spatial_ref_sys table of postgis. I know that you can get insert statements on spatialreference.org; ...
0
votes
1answer
44 views

Most efficient way to find if a polygon falls with in the boundary of another polygon using postgis

I have a polygon layer that contains some polygons inside of polygons. I need to be able to identify the polygons inside of polygons and discard the polygons inside of the polygons. What is the most ...
5
votes
3answers
206 views

In PostGIS, how to count nearby points efficiently?

I have one dataset A with around 6K point geometries and another dataset B with around 600K point geometries. I am trying to come up with an efficient way to update dataset A with an integer ...
7
votes
4answers
476 views

How to calculate the “depth” of a linestring using postgis

I have linestring features, which look like bent linestrings, hemicycles or convex or concave linestrings. In the moment I can select the distance between the startpoint and endpoint of each feature. ...
1
vote
3answers
152 views

Copying schema of Postgis or Spatialite DB to blank one

I want to copy a Postgis or Spatialite DB sctructure (features, tables) to a blank DB. In ArcGIS i can easily handle it by using XML Workspace Document. Fisrtly extact it from a Geodatabase and than ...
1
vote
2answers
1k views

how can convert geometry type to geometry(Point)?

I think my question is stupid but I'm blocking. I just work with postgis ST_Line_Locate_Point function (linestring, point). to find the ends of lines. My problem is that my objects geometry type, not ...
5
votes
1answer
296 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
3answers
388 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
165 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
533 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
103 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 ...
3
votes
1answer
524 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
900 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
96 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. ...
3
votes
1answer
341 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
59 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
169 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
56 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 ...
7
votes
2answers
299 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
246 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
505 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
376 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
1answer
172 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
197 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: ...