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

learn more… | top users | synonyms

0
votes
0answers
5 views

Is there a PostGIS equivalent to the ArcPy.Slice function?

I have an existing system built on an 8.3 PostreSQL database which uses a ArcGIS - Spatial Analyst for a couple of raster operations. The system is moving to PostgreSQL 9.2 and I'm evaluating if the ...
1
vote
0answers
30 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
4 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 ...
0
votes
0answers
30 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: ...
0
votes
0answers
14 views

Import KML file into GeoDjango

I'm trying to import a KML file into an existing GeoDjango app (using a Postgres 9.3 database). This is my Django model: class PCT(models.Model): code = models.CharField(max_length=3, ...
0
votes
1answer
16 views

Fast way to check if postgis bounding box contains any points/linestrings

I have a bounding box given and want to know if this bounding box contains (or better intersects) any points or linestrings. So the query should return true if the first point/linestring was found and ...
0
votes
0answers
11 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 ...
2
votes
1answer
12 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 ...
0
votes
0answers
19 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
17 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 ...
1
vote
0answers
15 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 ...
0
votes
0answers
5 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
0answers
20 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
37 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
0answers
15 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
22 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
0answers
24 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
2answers
44 views

How to populate a table with geom line? [on hold]

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
1answer
32 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. ...
0
votes
0answers
30 views

Problem to visualize raster data from PostGIS in QGIS

I have two multiband raster files and i'm trying to load these data into PostGIS using raster2pgsql. Here is the syntax that i used: raster2pgsql -c -s 4326 -I -t 100x100 *.tif ...
1
vote
0answers
24 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 ...
0
votes
0answers
14 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 ...
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 ...
1
vote
0answers
10 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
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 ...
0
votes
1answer
25 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
58 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 ...
0
votes
0answers
17 views

How to switch the region of an osm tile-server PROPERLY & how to reset update mechanism

can anyone help me? Thanks to this switch2osm manual I have been able to set up and run a tile server on my old machine for testing purposes. Up to some weeks ago it served custom mapnik-osm-style ...
0
votes
0answers
49 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 ...
0
votes
0answers
16 views

Computing View Distance in One Direction from Point on Elevation Raster in PostGIS?

I'm a software developer just getting into GIS, so please forgive me if I don't use proper lingo, or if I use proper lingo incorrectly! I have a raster of elevation data. For a given point in the ...
1
vote
1answer
26 views

Move features to different geographic area

I want to move a dataset of a few thousand vectors to a different geographic area. However I can't seem to find any tools to do this, or I'm not sure on the terminology for what to look up. I suppose ...
1
vote
1answer
47 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 ...
1
vote
0answers
25 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 ...
0
votes
1answer
27 views

Use C# to display PostGIS data in ArcGIS Developer kit with arcgis-ogr plugin

I am trying to display data in ArcGIS Runtime Engine Developer kit 10.2.2 using OGRPlugin/OGRPlugin/ develop by Ragi Yaser Burhum on https://github.com/RBURHUM/arcgis-ogr . I am using this format but ...
1
vote
0answers
28 views

GeoServer: Get styles from PostgreSQL/PostGIS table

We're running GeoServer with all layers coming from a PostGIS data source. Most people work directly on the PostGIS database, but we have one person sitting 10.000km away, and for him, connecting to ...
0
votes
2answers
51 views

Postgresql trigger on a table that update a field

Depending on values on 2 fields A and B, I would like a field C to be updated or filled with a specific value. For example : create or replace function periode() returns trigger as $BODY$ begin IF A ...
-2
votes
2answers
89 views

How to populate my table with data in excel format?

I have 160000 rows of data in Excel and I want to put them in my table in PostgreSQL. How can I import X,Y coordinates from my excel file to my table in postgresql?
0
votes
0answers
23 views

How to get elevation of a coordinate given a dtm file out of a PostGIS?

What would be the best way to get elevation of a coordinate out of a PostGIS database (SQL/plpgsql) given a GeoTIFF dtm file? Importing as PostGIS Raster (which seems more costly) and calling ...
1
vote
1answer
29 views

Why does ST_Area return different results for geog vs geom?

I have this simple query that returns very different values for a geom vs a geog: SELECT ST_Area(the_geom::geography) as area1, st_area(the_geom) from neighborhood where city_id='ny-new-york-city' ...
0
votes
0answers
15 views

Creating raster from points that conforms to a reference geometry using PostGIS, python, QGIS

Please forgive my ignorance, I'm fairly new to processing GIS data. My bread and butter is statistics but I'm now working on a project that requires more data preprocessing and cleaning than I've ...
2
votes
1answer
30 views

ST_LineMerge doesn't return LineString

I want to create a LINESTRING from a MULTILINESTRING. However in the following case ST_MultiLineString is returned: Select ST_GeometryType(ST_LineMerge(ST_AsText(' MULTILINESTRING( (-70.52570888 ...
0
votes
0answers
34 views

Any recomendations for a GIS web app?

I'm new at this world of geographic systems. I'm at Ubuntu 14.04 and I'm using Django (v1.6) to create an app that is both a CMS and a GIS. I already finished the CMS so now I'm trying to get started ...
1
vote
2answers
23 views

PostGIS ST_GeomFromGML giving strange result

I'm currently running Postgres 9.1 with PostGIS 2.0. I am trying to create a polygon geometry from the following GML: <gml:Surface gml:id="ID_63_1413425013514_23322" ...
0
votes
1answer
39 views

What is the best way to get two points along the line in both directions using postgis?

I have a point on a linestring geometry (found by an intersection). What is the best way to get two points along the line in both directions using postgis? It does not really matter if the points ...
0
votes
0answers
19 views

Shapefiles from PostGIS to Overlays in Legends

How do I make shapefiles from PostGIS legend overlays in OpenGeo. I've seen a couple of examples in GeoExt but they do not really address my problem.I have set this shapefiles in config section on ...
1
vote
0answers
21 views

Postgis - Creating Ellipse in WGS84 with metric parameters

I have points in WGS84 (x,y), radiuses in meters (rx, ry), rotation angle in degrees. I would like to create a new WGS84 geometry. I've tried this but the major/minor distances seem to be off by a ...
0
votes
2answers
28 views

Postgis: Query ST_DWithin in square instead of circle

The ST_DWithin query queries all geometries within a certain radius from another geometry (in my case a point). For performance optimization of my application I want to query in a square. So that the ...
0
votes
2answers
27 views

“linestringZ” kills “pgr_createTopology”

I'm trying to make a postgis tabel ready for pgrouting. But when I run SELECT pgr_createTopology('network.VEJM_BR_SL', 0.001, 'geom', 'id'); I get an error: "Geometry has Z dimension but column ...
1
vote
1answer
26 views

How to deal with multiple overlaps in PostGIS?

I've been fighting this for quite a long time and everytime I think I got it, I got it wrong actually. What's the trouble See picture below. As a result of line buffers I got overlaps that need to ...
1
vote
1answer
25 views

How to select distinct geometries and ids with PostGIS?

I have point geometries in a PostGIS table. I want to select only the distinct geometries from this table. If a geometrie is duplicated, it should select the first appearance in the table. I tried to ...