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

learn more… | top users | synonyms

1
vote
1answer
315 views

Downloading the distribute_setup.py

I need to download distribute_setup.py from the following website and the website seems to be broken, has anyone got an idea where else I can download this from? ...
0
votes
0answers
37 views

Make PostGIS points from Ajax data in a php file

I have an AJAX a string which has lat-long parameters in a request. I try to make point in an SQL query but I get this error 37.15452626 ERROR; parse error- invalid geometry HINT: ...
1
vote
0answers
66 views

PostGIS: Ordering by the sum of two distances

I have an SQL statement that selects possible bus routes between two points, ordered by the walking distance required from the start point to the departure bus stop (distance1) and the arrival bus ...
0
votes
0answers
15 views

problem with to addlister event google maps in same html file

I try to make two actionlistener one when the mouse over a marker show a infowindows and the other is for get when click on a market the lat and long and make an AJAX request the two lister code is ...
3
votes
1answer
225 views

Get Multiple Shortest Path using PgRouting in One Query

I am trying to get multiple shortest path using A* Algorithm available in PgRouting. I referred Solution given by UnderDark ( Link of the Stakoverflow Post ) . But it is not giving me proper Output. ...
2
votes
1answer
322 views

Using ST_MakeEnvelope over the dateline

I'm using ST_MakeEnvelope in PostGIS to try and make geometries that cross the international dateline, but they are making a shape that wraps the other way around the globe. The geometry I want is ...
1
vote
2answers
198 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
2answers
157 views

Error in displaying wfs layer from mapserver/postgis

I have read and tested all the relative posts but I still don't have a solution for my problem. I have a layer suscribers (points) stored in postgis database with srid=32232. I would like to display ...
9
votes
4answers
5k views

How to insert a GeoJSON polygon into a PostGIS table?

I need to insert a polygon from GeoJSON to my PostGIS table. This is how the SQL query looks like. INSERT INTO tablename (name, polygon) VALUES ( 'Name', ST_GeomFromGeoJSON ( { ...
0
votes
0answers
13 views

Load a shape file in postgresql DB with php

I am trying to load a shapefile in a postgis database using the exec() command. I have read the format I have to follow from here and I checked several similar questions from the forum. Based on the ...
1
vote
3answers
521 views

Importing MaxSea 3D Database to PostGIS

I am currently working on a project, where I combine several MaxSea 3D databases, which contain depth measurements made by the echosounder onboard on a ship. The idea is to combine these databases to ...
2
votes
1answer
22 views

Postgis 2.1: ERROR: Shell is not a line - SQL state: XX000

My current setup is PostgreSQL 9.3.6 & PostGIS 2.1.5 I have a table with contour lines (multilinestrings) that I wish to group by the attribute 'elevation', and make polygons out of them. The ...
1
vote
2answers
193 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: ...
1
vote
1answer
220 views

How to calculate the track length of GPX files with PostGIS?

I am trying to calculate the length of a GPX track. The original GPS data looks like this: <?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <gpx ...
0
votes
0answers
26 views

PostGis without shp2pgsql

I recently reinstalled postgis on my pc, following these instructions link. The installation is successful, and for several days work using PostgreSQL and PostGIS without problems. Now, I need to ...
1
vote
0answers
26 views

ST_Split and looping problems PostGIS

I am a total PostGIS noob, and am having trouble understanding the finer points of SQL syntax. I am trying to take a large set of line data and clip it with a polygon. I then want to create a new ...
3
votes
1answer
5k views

Transforming from SRID 900913 to 4326 with PostGis

I have two Postgres tables with different SRIDs: 4326 and 900913. I want to convert the latter to 4326. I first changed the SRID using: Select UpdateGeometrySRID('table', 'geomcolumn', 4326). I ...
0
votes
0answers
6 views

Changing color of multispectral Raster Image using PostgreSQL/PostGIS query

Would like to change the color of a multispectral Raster Image. looking for changing band rendering values for Red, green and Blue bands using PostgreSQL/PostGIS query. I have loaded the raster ...
1
vote
2answers
50 views

How to populate a table with geom line? [closed]

I have the coordinates of a lot of points in a table. In pgadmin I want to make a line that passes on these points. I already have my Coordinate point im my table. I want to make line with those ...
1
vote
0answers
18 views

Tool, API of or code samples for calculating spatial similarity between Lines

I migrating a database with a road network to an other external data provider. We have joined our own data about roadworks, temporary speed-limits etc. using ID en Linear referencing on this data. So ...
1
vote
0answers
21 views

pgRouting. pgr_ksp() returns -1 as id3

The documentation (http://docs.pgrouting.org/dev/src/ksp/doc/index.html) says that the result should be 0 for the last row. Is the same 0 than -1? I'm new on this. Thaks for the help.
0
votes
1answer
47 views

Convert string column back to geometry column?

I had a table with a column set to 'point' in doctrine2, but this was changed to 'string' and updated. I can't change it back to 'point' in doctrine2, I get an error: ...
0
votes
3answers
297 views

Coordinate System Google Maps API

I am making an application in java using GMaps4JSF where the person will enter the address on the map I'll take this coordinate and consult on my postgis base regions in which region this point is ...
0
votes
0answers
18 views

Update Statement in PostGIS ERROR

I am trying to update a column in PostGIS using information from a column in another table where they spatially intersect. I looked up how to do this on the PostgreSQL tutorial and I think that I ...
0
votes
0answers
27 views

Clipping vector data (Point) with one class in symbolised raster

I have some .asc raster data I symbolised with ranges in two classes. Say 2.145 to 10.000 and 10.001 to 30.1254. Now I want to clip vector data with the area covered by 2.145 to 10.000. How can I ...
0
votes
2answers
95 views

pgr_dijkstra function not finding node that appears in ways table

I am having a problem with pgr_dijkstra algorithm not finding some of the node vertices in my table. I have a large dataset of survey travel diaries and am trying to determine their shortest paths ...
1
vote
1answer
206 views

SQL-query should return GeoJSON FeatureCollection

I'm trying to return a GeoJSON FeatureCollection object from a SQL-query with PostgreSQL 9.3 and PostGIS 2.1. This is my query so far: SELECT row_to_json(fc) AS p FROM (SELECT 'FeatureCollection' ...
0
votes
0answers
28 views

Displaying measurements on a grid of the Earth

I'm developing an application where I need to draw the averaged results of some measurements on a map. Right now, I'm using Leaflet to draw the map with MapQuest/OpenStreetMap tiles, and have the ...
1
vote
1answer
39 views

Mixing POINT and MULTIPOINT in PostGIS table

I'm trying to load a bunch of GeoJSON files into one PostGIS table. I get this kind of error: Warning 1: Geometry to be inserted is of type Point, whereas the layer geometry type is Multi Point. ...
2
votes
1answer
41 views

Coloring multilinestringzm M values in QGIS

I have output from a geophysical technique that produces X,Y,Z and scalar value for millions of points, which have been stitched together appropriately (by networkx if it matters) into ...
1
vote
2answers
154 views

How to style ways with CartoCSS depending on a relation property (OSM)

I'm using CartoCSS together with an OSM Postgres DB (hstore on). I want to set the line color depending on the operator tag of relations (routes). How can I do that? Update Thanks to Paul Norman for ...
0
votes
2answers
134 views

Enlisting all OpenStreetMap (OSM) street names for General Transit Feed Specification (GTFS) routes?

I have exported OpenStreetMap (OSM) data of a city to my local postgresql db using osm2pgsql. I would like to add the General Transit Feed Specification (GTFS) routes information (say bus routes) ...
2
votes
2answers
47 views

Is a multi-database select possible with DB Manager?

I have data in two locations: geometry data (with attributes) on a PostGIS server (read only) a geometryless table on a local SpatiaLite DB (read+write) I need to select features based on data ...
3
votes
1answer
130 views

Is it possible to update only latitude or longitude in postgis?

I have a postgis database that contains Points created based on a couple (longitude, latitude), and I need to update only one of those two for a given point. I found that it's possible to do so but ...
1
vote
0answers
29 views

How to display table with more than one image from postgis in mapserver?

I have 3 tif files in one postgis(2.1.5 ver.) raster table. ( load with raster2pgsql) And i have mapserver MapServer 6.1-dev. I need to display table from postgis in qgis via mapserver. P.S I trying ...
1
vote
0answers
12 views

Replicate results from JSI using PostGIS

I am using OSM and facing an issue with finding the nearest road-segments to a given lat/lon point. I have a code that uses Java Spatial Index JSI which traverses the RTree index while computing the ...
0
votes
0answers
23 views

ClassNotFound Exception: org.postgresql.Driver Using Geotool: gt-imagemosiac-jdbc-x.x.jar

I am a newbie to GIS, coming from a strict MIS background. Anyway, I have been having a little challenge for the past couple of days trying to import tiles and pyramids into my database. Using a ...
0
votes
0answers
16 views

How do I begin creating my open layers Web Map? [duplicate]

I'm completely new in the world of web mapping. I am however determined to learn and create a web map within a month or less. I have some geographical areas that have sites (Solar PV Sites) I want to ...
2
votes
1answer
544 views

Create isochrone from multiple start points

I want to create an isochrone. For this I could use the pgr_drivingDistance function with pgRouting (http://docs.pgrouting.org/dev/src/driving_distance/doc/index.html) but it only takes one start ...
1
vote
1answer
125 views

using postgis function in pyqgis

I'd use Postgis function in Pyqgis script. This code: qsql="(select gid, id, St_Buffer(the_geom,200) as geom from archi)" uri = QgsDataSourceURI() uri.setConnection("ip", "port", "x", "x", "x") ...
1
vote
1answer
53 views

Creating GeoJSON from Postgres

We are transitioning from Google Maps to Mapbox. Mapbox is a proponent of geoJSON and uses it extensively, so we are considering adopting it for all of our maps. An issue is the creation of the ...
0
votes
1answer
28 views

Adding M coordinate with different measurings in PostGIS

I have a line table made of several linestring features in succession, so that all linestrings together would form one continuous line, such as: id | geom ----+----------------------- 1 | ...
3
votes
1answer
66 views

PostGIS - ST_Within or ST_Disjoint performance issues

I have a table of about 150,000 points in PostGIS with a spatial index and a SRID of 27700 (OS). I want to select the points that fall outside England and Wales. I have a multipolygon table with ...
2
votes
1answer
204 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 ...
10
votes
3answers
2k views

Future of spatial databases?

It may be a bit off-topic. I am eager to know the industry specific importance of Spatial Databases. Is Spatial Database a very important part of any GIS system? Or will we use other technologies to ...
0
votes
0answers
50 views

Given distance (in meters) what is the angle in geographic reference systems? [duplicate]

In QGIS and other systems sometimes I have a layer in geographic reference system (typically WGS84, EPSG:4326) and I'd like to calculate a buffer of say 5000m around a point. So, given a point ...
2
votes
1answer
123 views

pgsql2shp ERROR: incompatible mixed geometry types in table

I have multi-linestring in .shp files and I split the lines with postgis, but that result is only geom column. It does not works with shape file exporter error: incompatible mixed geometry types ...
1
vote
0answers
38 views

Mapserver display empty map when i add more then 1 raster file in 1 table postgis

Here is a part of mapfile with layer and WMS: WEB METADATA wms_title "Diplom" wms_abstract "no matter" wms_onlinesource ...
3
votes
1answer
59 views

ST_GeomFromGeoJSON strips coordinates, is it a bug?

I'm storing some geo paths in PostGIS using GeoJSON and the ST_GeomFromGeoJSON()-function but I just found an issue with it: SELECT ...
0
votes
3answers
304 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 ...