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

learn more… | top users | synonyms

1
vote
0answers
50 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 ...
0
votes
1answer
42 views

How do I avoid this osm2pgsql duplicate key error in Windows?

I am attempting to load an OSM .bz2 file into a PostGIS database using osm2pgsql but am stuck at a duplicate key value in the nodes which violates a unique constraint - any suggestions? output is ...
1
vote
1answer
121 views

Development guide for beginner? [duplicate]

Im new to GIS and mapping, and I need to learn how to create web map application for my project. I'm really confused on what to use. I have read PostGIS, OpenStreetMap, and Openlayer. I'm wondering ...
2
votes
1answer
74 views

POSTGIS - calculating percent area of intersection in where clause

I have a table of polygons (census block groups) in postgres. I want to tag each block group with the town (another polygon table) it mainly resides within. Is this possible? I'm thinking I'd need to ...
0
votes
1answer
55 views

Import DEM into PostGIS for QGIS

I'm a complete GIS newbie so sorry if I'm using the wrong terminology in searching for a solution to this... I'm trying to import a DEM into PostGIS and display it in QGIS. The data is from the EU-DEM ...
0
votes
1answer
174 views

How to use Google Maps projection with GeoDjango/PostGIS

I am building a web service with GeoDjango which involves user submitted events including a location. I created a model field for my location using django.contrib.gis.db: location = ...
2
votes
1answer
35 views

When I publish a layer(shapefile or postgis) with TileMill, 200 meters moves

I hope someone can help me. Not if you know the TileMill application I'm working with her to publish layers look more beautiful. Well, first I have posted directly loading the shp file., But when ...
1
vote
2answers
55 views

how to do simple self join and touches function in postgis?

I am having trouble with this query and neighbor calculation in PostGis. I want to find out which are the neighbors of Sweden in the table COUNTRIES which has column 'the_geom' for geometry and ...
0
votes
0answers
17 views

Serial Int Primary Key not recognized by QGIS 2.2.0

I have a table "lines" stored as MULTILINESTRING features in PostGIS 1.5 ---------- -- Begin Table Definition: CREATE TABLE lines( gid serial NOT NULL, geom geometry, CONSTRAINT roadgeo_can_pk ...
1
vote
1answer
31 views

Break line into 100m segments

I have a line geometry in PostGIS and I am wondering how I would break the line into 100m segments. Is there a function for this?
1
vote
2answers
78 views

invalid KML representation on ST_GeomFromKML

I exported a table with a geography(MultiPolygon,4326) column using ogr2ogr to a KML file. When trying to re-import any of the shapes using the ST_GeomFromKML function I get the following error: ...
2
votes
0answers
76 views

TileMill Exports Failing

I'm having trouble exporting my map in TileMill (v0.10.1). I'm using OSM Bright with a PostGIS database connection to import OpenStreetMap data. When exporting an SVG or PDF through the user interface ...
1
vote
3answers
135 views

geography, geometry, distance, and wkt - PostGIS

I'm trying to understand the data conversions that happen in PostGIS when calculating distances in SRID 4326. Why is it that when I run on my marin_jobs points table: select cast (the_geom as ...
2
votes
0answers
53 views

QGIS is not working with Postgres Plus Advanced Server

We have a problem to integrate GIS software with our GIS database which is populated on Postgres Plus Advanced Server 9.2 from EnterpriseDB. We are using QGIS to maintain and analyze our GIS ...
0
votes
1answer
63 views

pgShapeLoader: how to load a shapefile in a different schema than 'public'

I'm trying to load a shapefile in POSTGIS using pgShapeLoader. It works but I can load table only in the "public" schema and i don't know how to configure, the tool to upload my shapefile in another ...
2
votes
2answers
282 views

Postgis 2.1 error after update

After a usual update progress - "apt-get upgrade" - I can not connect with qGIS to my PostGIS DB anymore. Error in the qGIS logfile: Your database has no working PostGIS support. Erroneous query: ...
1
vote
1answer
56 views

Geoserver OSM data Imported via osm2pgsql - most efficient tables to use to style roads

The Osm2pgsql importer for OSM data to Postgres results in two tables for ways, one called planet_osm_roads and a second one called planet_osm_lines The Osm2pgsql documentation states that the ...
0
votes
0answers
36 views

Displaying 3D city model from PostGIS 3D backend

I know that openlayers doesnt support 3D yet. I heard about Kartograph has 3D features but Does Kartograph support reading data from backend database especially PostGIS? I would like to create a 3D ...
1
vote
1answer
51 views

Possible to store 3D features such as dome into geospatial database?

Is it possible to store 3D features such as dome into geospatial database such as PostGIS? I know that it can store x,y,z data, can such complex features be stored into database?
1
vote
3answers
105 views

Dismiss invalid Polygons in PostGIS

I Have a massive Dataset from OpenStreetMap and imported it into a Postgres-Database using ogr2ogr. I got several warnings during this process because of multipolygons with too little vertices. Now I ...
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 ...
0
votes
1answer
54 views

How can I find the segment of a line that lies within a polygon using Postgis?

Given a "road", represented by a line, that crosses a "state", represented by a polygon: What is the SQL query I can use to find the segment of the road that is within the state? A concrete example. ...
0
votes
0answers
46 views

PostGIS Function both work fine

I create two function both work fine same solve, but one of them, take to much time (which one use "temporaly"). Is very important because I will run in several times the funcion. Please any one can ...
1
vote
2answers
46 views

How to get a set of all buildings of an OpenStreetMap section in form of single points / Multiple polygons as one point

The objective is to get a set of all buildings of an Open Street Map section in form of single points in a shapfile. I downloaded the section from osm. Imported the section into QGIS (and later ...
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
1answer
42 views

Why is “Add feature” of the GPS Information tool inactive for some of my PostGIS layers?

Sorry If I rise it again on this forum but I couldn't find any info on limitations/requirements of "GPS Information" tool for QGIS (2.2.0) against data layers. For some layers I'm able to collect ...
2
votes
1answer
66 views

Reverse Geocode with PostGIS use Open Street Map Database

I want to reverse geocode with postGIS use OSM database, I use FUNCTION: <!-- language: lang-sql --> CREATE OR REPLACE FUNCTION khoangcach(lat double precision, lon double precision) RETURNS ...
0
votes
0answers
50 views

Using postgis functions in ArcGIS Server 10.2 for Layer Definition Query

I asked the previous question Using PostGIS functions in ArcGIS Desktop for Layer Definition Query? And got an excellent answer. However this covered ArcGIS Desktop. In 10.0 it seemed that if I got ...
1
vote
0answers
46 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 ...
0
votes
2answers
54 views

How to select the cross streets in postgis spatial table?

I've used ST_Intersects and ST_Crosses but between two different tables. I have a table of streets and intersections want to know them. For example select all streets that cross the Street A. Can ...
0
votes
0answers
92 views

Setting up PostGIS: Postgres can't see the PostGIS extensions?

I've just installed Postgres 9.3.4 and PostGIS 2.1 on OSX Mavericks using the very latest versions of the KyngChaos libraries. This is a new machine, and I deliberately haven't installed Postgres ...
0
votes
2answers
42 views

Identify circuits/loops in GPS track data

This question will be naive and uneducated, but I gotta start my research somewhere, so I'll ask for references and pointers... Let's say you have a GPS time series with a set of lat/long coordinates ...
1
vote
1answer
39 views

how to add data from a layer to postgis table with different field names

I am importing waypoints from GPS (in gpx format) using Layer>Add Vector layer and then I want to clean up the data and add some more attributes and finally add them to a master table in PostGIS. The ...
0
votes
1answer
57 views

PostGIS Spatial Index not used after copying table

I am copying a PostGIS database from my computer to our webserver. I always had problems to copy the entire database using pg_dump and pg_restore so I am creating a new database on the server and copy ...
3
votes
1answer
51 views

Rounding bug using ST_GeomFromGeojson()

Let's say I have the following geographical point represented in GeoJSON: {"type":"Point","coordinates":[-109.0,35.292506]} When I run the following conversion, things work as expected: SELECT ...
0
votes
0answers
25 views

Points generated using mmqgis are invalid

I used mmqgis plugin to geocode some addresses, he pointed to have found them all. But the screen shows only a point when there are more than 100, in the attribute table all appear. I loaded this ...
0
votes
1answer
94 views

Can't load pgrouting extension, could not load library librouting_dd.ddl error 998 windows

I have a windows 7 machine 64-bit, I installed Postgresql 9.3 via the opengeo suite 4.0.2 in the program files (x86) folder, so I guess I have to install the 32-bit version of the extension. I am ...
2
votes
0answers
55 views

how do I create a RESTful PostGIS web Service Framework?

I have PostGIS tables that store vectors that want to show on Google Maps. Read the post http://gis.stackexchange.com/questions/22354/how-to-display-a-postgis-table-on-google-maps But one thing that ...
0
votes
0answers
26 views

Sort Proximity Results Into Groups Based on Distance from Center

The scenario is as follows: I have a database of pizza places with review averages. I want users to be able to find pizza places near a location and have them sorted by distance. Pretty straight ...
0
votes
0answers
26 views

How to register geometries using OpenLayers and GeoServer in PostGIS?

I put a Editing Toolbar on my page using Google Maps Api as base layer. I want to register lines and points in PostGIS. But I want to know how I can get the longitude and latitude of gemotria (line ...
1
vote
1answer
83 views

storing date range in PostgreSQL/PostGIS for time parameter in WMS/WFS

Using GeoServer I want to deliver some objects/features with WFS and WMS. The objects and their attributes have a date range during which they are valid. Say, we have street lamps and each street lamp ...
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, ...
0
votes
1answer
95 views

Difference between 2 projections?

I have osm.xml file where projection is defined as follows: Map background-color="grey" srs="&srs900913;" minimum-version="2.0.0"> n settings.xml file projection is also set there as: <!ENTITY ...
0
votes
1answer
58 views

PostGis geometry name lookup failed for table

I have a table name erpAssets which has column name Region of type polygon. it contains entries of points also like (-79.4609576808001,43.9726680183837)). I have written query which convert these ...
0
votes
1answer
37 views

problem transforming pgr route to a line - unexpected extra lines from St_MakeLine

I have created a line geometry from a pgr_dijkstra querry and I am getting an unexpected looking line in qgis. The following image illustrates the problem: The magenta line is the line created ...
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
1answer
82 views

Difference between planet_osm_polygon and planet_osm_point tables

What's the difference between the planet_osm_polygon and planet_osm_point tables? I find similar columns in both tables.
3
votes
1answer
76 views

How to render overlapping bus trips as one route from OSM?

I would like to create bus map for my city from OSM data. I imported data into Postgresql with osm2psql and I can render routes with Mapnik. But the problem is that same route ref is shown multiple ...
0
votes
0answers
27 views

Postgresql (soln would be basic SQL I think): ORDER by distance to a point and return those distances in array pairs w/ the full records

so I know there have been some questions asked about how to calculate distance using postgis and how to order results by their distance from a respective point. I'm not very talented at SQL (at all) ...
0
votes
1answer
26 views

Switch line direction for PostGIS-lines in QGIS or Pgadmin

I am trying to switch the line direction in a PostGIS-layer. The postgis-geometry column is e.g. "LINESTRING(0 0, 1 1, 2 1, 2 2)". The reason is that my symbology is direction-dependent, but I drew ...