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

learn more… | top users | synonyms

2
votes
0answers
276 views

Geoserver - empty native SRS field

I'm converting layers from shape files to postgis with the below command: shp2pgsql -s 22175 -c -W "latin1" path/file.dbf' table_name db_name | psql -d db_name Next, I add this layer to the ...
2
votes
0answers
371 views

Clustering table on geohash index and geohash ordered table

I wonder if there could be a performance gain to re organize the rows in a table by Geohash and then CLUSTER this table on the Geohash index of the geometries. CREATE TEMPORARY TABLE tmptbl AS SELECT ...
2
votes
0answers
104 views

Installing knn on PostgreSQL for windows

I am trying to install the extension KNN for clustering as an extension on my PostgreSQL database. I have downloaded the file http://www.pgxn.org/tag/analysis I found instructions on how to ...
2
votes
0answers
25 views

Spatial overlay data from many lines into a single line

Hello I have joined lines in my data set into longer lines (based on similar attributes) to reduce the number of rows in my data set. Now I want to take the information from the original smaller lines ...
2
votes
0answers
105 views

Storing features in PostGIS and then creating layers using queries

I have a whole set of line segments or tracks that represent real tracks or, in some case, boundaries between areas. These segments form a network of lines on the map. I have a number of GIS layers, ...
2
votes
0answers
112 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 ...
2
votes
0answers
33 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 ...
2
votes
0answers
233 views

How to import PostGIS layer with geography type to QGIS?

I tried to import in QGIS a layer from a PostgreSQL table with a geography type column created through the extension PostGIS. I noticed that QGIS doesn't seem to like the geography column... Here ...
2
votes
0answers
225 views

Different results given by PostGIS and MySQL?

I'm developing a spatial database of administrative areas. I started out with PostGIS, but as MySQL is being used in our other projects, I thought I would at least try to create a spatial-enabled ...
2
votes
0answers
178 views

Projecting PostGIS in Openlayers

I have a layer(base layer) with MultiLineString Geometries and now I need to project the layers(overlays) in the base layer from PostGIS using OpenLayers. However, I got an idea how to project table ...
2
votes
0answers
225 views

From pgRouting shortest_path back to osm node id

I'm successfully performing path finding queries like shortest_path on data imported with osm2pgrouting. The tables I have inside my pgrouting DB are the following: List of relations ...
2
votes
0answers
181 views

Error recognising password; importing OSM to PostGIS in QGIS

When selecting OSM Tools (Import into PostGIS) , attching my .osm file in the Input option, selecting my OSM Database, and then clicking run, I am prompted to enter a password for connection. "Enter ...
2
votes
0answers
238 views

Postgresql Query Plugins Not Returning Results in QGIS

I'm using the Fishnet function as described here to create a grid. If I use the following SQL to call the function to position a grid where I want it (I'm using NZGD2000 SRID = 2193) the query ...
2
votes
0answers
182 views

Displaying text from dxf in Openlayers

I managed to import .dxf into Postgis table, and now have, among others, rows with Point geometries and values in text column (which corespodent with Label values from ACAD .dxf). What is the best ...
2
votes
0answers
82 views

MultiPolygon from database

I would like to know how to create an instance of a Multipoint from a PostGIS database.. I do the query , then got the ResultSet named "area" , the column with MultiPolygon attributes is named "geom" ...
2
votes
0answers
363 views

PostGIS: ST_Transform function conversion problem

I'm inserting map data from a GML file with srid EPSG:27700 into a PostGIS database table with srid EPSG:4326. I'm using the ST_Transform function as in this snippet: ...
2
votes
0answers
282 views

Parcel ID Mapping (brainstorming)

In my project I have a table full of residential properties by Parcel_ID. Table 2 is a TIGER streets shapefile. I would like to build a query in MS Access displaying all properties within a mile ...
2
votes
0answers
90 views

network related issues arising when running an arcpy script

Essentially I wrote an arcpy script that is within a toolbox that I ported over to a different machine to test out after the script worked locally. The script essentially utilizes the psycopg module ...
2
votes
0answers
100 views

Symbolizing Layers from a PostGIS Database to many Client Computers

I was hoping someone could help with a symbolizing issue. I have a PostGIS database on a server with a number of layers. The layers of a series of polygons, lines and points that all share the same ...
2
votes
0answers
379 views

line segments using points

Is there a way to get line segments from a linestring using points with lat/lng coordinates? ST_Line_Substring is taking float8 start/end points. Is there a way to replace the float8 with lat/lng? I ...
2
votes
0answers
420 views

Arc by center point in PostGIS does not fit the circle

I'd like to store a GML ArcByCenterPoint in PostGIS. I can work out the start, middle and end points required by the CIRCULARSTRING type and all seems to be OK, except that when I visualise the arc it ...
1
vote
0answers
25 views

Undefined symbol error when creating postgis extension

When trying to create postgis extension, I'm getting an error, no references in google on it. maptest=# CREATE EXTENSION postgis; ERROR: could not load library "/usr/pgsql-9.3/lib/rtpostgis-2.1.so": ...
1
vote
0answers
44 views

Counting self intersections of linestring using PostGIS?

Is there a way of using PostgreSQL + PostGIS for finding the number of self intersections in a linestring? I have a linestring that goes forward but in circles, and I need to find the number of times ...
1
vote
0answers
16 views

Debugging ogr2ogr “AddGeometryColumn failed” and “Terminating translation prematurely after failed translation of layer”

As noted in the title, I'm getting the following error: ERROR 1: AddGeometryColumn failed for layer pretty_polys, layer creation has failed. ERROR 1: Terminating translation prematurely after failed ...
1
vote
0answers
24 views

Merge overlapping GeoJSON GeometryCollections

I need to merge three overlapping GeoJSON GeometryCollections of Polygon. Ultimately, the end result needs to be a geom type for PostGIS (e.g. MULTIPOLYGON) so I can easily check if particular points ...
1
vote
0answers
34 views

Looking for free tools to automatically generate spatial data catalogue

I've recently inherited a whole bunch of spatial data (mostly shapefiles but some .gdbs) which relate to a bunch of different cities. I'm looking for a way to take an inventory of what data I've got ...
1
vote
0answers
25 views

Remove TileStache cache for a single feature

In a large parcel map, features are edited and need to be re-styled. I want to keep as much of the cache as possible, but invalidate the cache for features that are edited when the features are saved. ...
1
vote
0answers
81 views

qgis-2.2.0 database tab missing

I have recently installed QGIS-2.2.0 but the Database tab in the top-menu bar is missing. It looks the main reason is missing libgdal1h library. But when I am installing it, it's removing ...
1
vote
0answers
52 views

Collapse dual carriageway lines in PostGIS

I have OpenStreetMap data, which represents larger roads (e.g. dual carriageways, aka divided highways) as parallel lines. The question is answered for ArcGIS or Skeletron here, for example using ...
1
vote
0answers
45 views

Add polygons to PostGres to be queried by Nominatim

I'm trying to build out a geocoder that also returns the correct legislative district information from this data: http://www.census.gov/geo/maps-data/data/tiger.html I've got OSM data imported into a ...
1
vote
0answers
73 views

Open PostGIS layer with QGIS 2.2

I just upgraded QGIS from 1.8 to 2.2 and I am getting some troubles to open a PostGIS Layer. The connection with the server works fine, I can see all my tables, select the one I want to open and even ...
1
vote
0answers
48 views

PostGIS raster connection is not closed by MapServer

I'm using PostGIS raster in MapServer like this: TYPE RASTER DATA "PG:port=6432 dbname='mydb' user='postgres' password='1234' schema='public' table='truemarble' mode='2'" PROCESSING ...
1
vote
0answers
35 views

Implement a least cost path in a graph

I am trying to produce a routing functionality in a web-GIS that, given a start and an end point, will retrieve the least cost path taking into account points along edges representing major costs, ...
1
vote
0answers
26 views

Import raster to postgis and add a foreign key constraint

I use raster2pgsql to import raster files into a table with this command line: C:\Program Files\PostgreSQL\9.3\bin>raster2pgsql -s 4326 -M -F -a c:\temp\mun.tif public.basqui_raster | psql -U ...
1
vote
0answers
60 views

Gaussian plume model in PostGIS or geocouch

Does anyone know of existing code for dispersion modeling using Gaussian Plume or comparable model, that I could plug in / adapt to be used programmatically from PostGIS or alternatively via ...
1
vote
0answers
99 views

How to fix “Raster layer: Provider is not valid” error when loading PostGIS rasters?

I compiled and installed the current QGIS master as usual and I imported some raster data into my postgres 9.3 database with postgis 2.0.2 extension. Whenever I try to import the raster data into qgis ...
1
vote
0answers
102 views

Why does QGIS crash when my PostGIS table has a primary key?

Configuration: PostGIS Library: 2.0.3 GEOS: 3.3.8-CAPI-1.7.8 Proj: Rel. 4.8.0, 6 March 2012 PostgreSQL 9.2.2, compiled by VC++ build 1600, 64 bit, running on Win2012 server 64 bit QGIS 2.2.0 - 32 ...
1
vote
0answers
45 views

Point in Polygon operation for 100G of data

I have lat/lon point locations for over a billion points, all based in the US. For each point I would like to generate a dataset that links them to their county and to their MSA according to US Census ...
1
vote
0answers
36 views

PostGIS automatically creating geometries after importing using QGIS DB Manager

I have a shapefile consisting of linestrings, in which some of the features have null geometry. Yet, after importing it to PostGIS, using QGIS' DB Manager, a geometry is created for those features ...
1
vote
0answers
23 views

Use pgRouting with a PaaS

Is it a way to use a postGIS/pgRouting enabled database with a PaaS like Windows Azure? If not, do you know alternatives?
1
vote
0answers
47 views

Focal Mean of neighbors using ST_DWithin on points in PostGIS

I'm trying to calculate focal means on a grid of points in PostGIS. I know that a raster calculation would be more efficient, but I only need to run the algorithm once to get the data, so I don't ...
1
vote
0answers
35 views

PostGIS 3D Extrude function

I selected buildings from OSM (which represents my city). I insterted a new column 'height' and I filled with a random number exactly number 2, so every building have 2metres altitude. Buildings are ...
1
vote
0answers
17 views

How to simplify a polygon down to X amount of points?

If I have a polygon that has 100000 points, how can I calculate what the tolerance should be to simplify it down to 1000 points using ST_SimplifyPreserveTopology?
1
vote
0answers
34 views

qGIS' Database Manager “Load as New Layer” Option Not Working

I'm trying to visualize some of my database queries on qGIS. I run a valid SQL query which returns a subset of my table that should be easily loaded as a layer. I then check "Load as new layer," ...
1
vote
0answers
29 views

Problem installing Aggregate Polygons Function in PostgreSQL 9.3

I'm new to PostgreSQL and I've been trying to run a sql function written by Dr. Horst Duester, found in http://www.kappasys.ch/cms/index.php?id=65&L=5, which is used to aggregate detached ...
1
vote
0answers
60 views

Geoserver WFS Fails to Load in OpenLayers

I'm working with Postgis->Geoserver->openlayers on localhost. I followed a Geoserver tutorial to import some nyc sample data into my postgres/postgis database and link it to Geoserver. The layer ...
1
vote
0answers
22 views

ST_SplitRight() in PostGIS?

I am looking to split a shapefile via a line. I am interested only in the feature that lies to the right of the line; exactly what ST_SplitRight does here. Do any of you know of a way to do this in ...
1
vote
0answers
50 views

Do ArcGIS clients that direct-connect to postgresql/postgis databases override configuration settings?

I went in to modify some settings on a Postgresql database via the PGAdmin config editor and some of the settings don't have their default values and they are higher because they've been overridden ...
1
vote
0answers
85 views

Broken PostGIS support GDAL

I'm having some problems with Postgres/PostGIS after rebuilding my GDAL library:( I wanted to add MrSID support in GDAL so rebuilt it with the MrSID SDK. Everything compiled ok and I am now able to ...
1
vote
0answers
40 views

How to define Z dimension on table with PostGIS for import in TileMill?

I'm trying to reproduce the idea behind this blogpost from Mapbox, but with other data, for example the ne_10m_populated_places_simple dataset from Natural Earth. By adding a z-dimension to the data ...