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

learn more… | top users | synonyms

0
votes
1answer
32 views

How to cut contour lines at the edge of a data source

I have calculated some contour-lines using gdal-contour for two elevation model into a Postgis database. One is high res and the other lower res. Now I am seeing problems at the edge of my high ...
0
votes
0answers
33 views

How to arrange polygon in Postgis

I have a lot of polygons in a Postgres database. I want to show the polygons, but in order of the the biggest to the smallest. I used the following code: SELECT ST_Area(area_polygon) as luas FROM ...
0
votes
1answer
46 views

Problem with spatial index PostGis

I'm using Postgis 2.1. I have this table with about 50k rows: CREATE TABLE rilevazioni ( geom geometry(Polygon), stimolo integer, tmstmp timestamp without time zone, id bigserial NOT NULL, ...
1
vote
1answer
59 views

Matching GPS points to the road network

I am a newbie in Postgres and Postgis and I am trying to do a matching of GPS points to the road network. I need to find closest road from a shapefile and take speed attribute from it. I am using ...
4
votes
2answers
143 views

3d vector and geometry operations in open-source GIS

There is some really good open-source software available to work with 2D vectors. For example QGIS has operations like buffer / clip / dissolve / select by location / join attributes by location... ...
0
votes
0answers
15 views

How to store a circle in PostGis database row [duplicate]

I'm using PostGis 2.1. I need to store different type of geometry like polygon 2D,polygon 3D and also circle. I need these polygons represent areas in which an event occurs. Then I'll have to do ...
2
votes
0answers
67 views

How to create line segments between pairs of pixels in a raster?

I want to draw several lines between pixels (please see the image below) according to some criteria : First Criterion: The distance between 2 pixels is less than 2000m and greater than 500m ...
1
vote
1answer
61 views

ST_Intersection for polygons

I'm looking for a query that returns overlapping areas of two tables with polygon geometries. Using row_number() over() the entries of the gid column are not unique in the case of dumped ...
0
votes
1answer
46 views

Find shortest path between two points without spatial database

I have an an certain area contains less than 200 roads(polylines), and I need to calculate a shortest path between two specified points inside the area. I know maybe I can use the pgroute in postgis ...
2
votes
0answers
35 views

Import OSM Notes dump into PostgreSQL?

I'm planning to write some software to improve handling of OSM Notes, so I need them in postgis database. Following the documentation I found there is notes dump on osm.org, but I can't find if ...
2
votes
0answers
65 views

Visualizing variability in the size and shape of polygons

I am working with a data set of area restrictions imposed by criminal courts. These restrictions ban a person from entering a demarcated area. These restrictions vary in their size, shape, and ...
1
vote
1answer
32 views

simplify tiled geometries while preserving anything on the edge

I have a dataset of polygons split into evenly sized tiles. How can I go about simplifying them, but not along the tile edges, so that there aren't any gaps between continuous features when the tiles ...
0
votes
0answers
49 views

Why is mapserver returning a blank image?

I am trying to load a layer from a postgis database, mapserver does not return anything. I think I have narrowed the problem down to the fact that the sql query mapserver is running is returning ...
1
vote
1answer
60 views

Determine XY offset in meters between two lat/long points (EPSG:4326), and accurately recreating point locations using XY offset

I have two tables in EPSG:4326, one for home locations and one for site locations. I need to be able to generate the XY offset in meters between the home location, and the site locations. I then need ...
2
votes
1answer
29 views

ArcGIS resampling rasters by maximum pixel value?

I need to resample a binary image of linear features like roads, rivers to a coarser resolution, conceptually combining multiple pixels into a single one. 1 indicates presence of the linear feature, ...
0
votes
0answers
34 views

Speeding up PostGIS ST_AsGeoJSON

I am writing a query that would give me the geojson element contains the outline of a US State along with some additional information. The problem I am running into is the function ST_AsGeoJSON from ...
0
votes
0answers
36 views

How to use a PostGIS sequence in QGIS editing session?

I can't seem to get the sequence on my PostGIS table to increment to NEXTVAL in a QGIS editing session. My PostGIS table is defined as: CREATE TABLE qgis_topology_editing_test ( geom ...
0
votes
1answer
45 views

Trying to bind pop-up in leaflet via GeoServer GetFeatureInfo. Is there anything wrong in my code?

Simple Leaflet Map <script src="js/leaflet.js"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> ...
0
votes
0answers
21 views

Display graduated QGIS buggy?

I counted points in polygons in PostGIS like this UPDATE hexagons SET count = (SELECT count(*) FROM points WHERE ST_Within(points.geom, hexagons.geom)); That came back with that UPDATE 1554 That ...
0
votes
0answers
25 views

load raster (geotiff files) to postgis with url

I tried to load rasters to postgis with raster2pgsql but this not satisfy my project because it uses local files. i have 5000 and will be more in future geotiff files in cloud host. is it possible ...
1
vote
1answer
57 views

“Get” results of PostGIS [closed]

I am getting warm with post PostGIS. I am working in the Command Line. What I am wondering is how do I "get" the results of PostGIS. So imagine I have this select name, neighname from neighborhoods ...
0
votes
1answer
20 views

Parameterizing Postgis function in GeoServer's SQL Views

I have a problem when parameterizing a postgis function in sqlviews If i create this sql, all works like a charm attaching this &viewparams=idvia:6753 to the url SELECT ...
0
votes
1answer
51 views

spatial query using GeoExt and openlayers

I want to allow the the User to make advanced custom queries against a layer.So he can search by name or another attribute and get zoomed to the requested feature ( hospital in my case) . I m ...
0
votes
1answer
30 views

Raster and Geometry ST_Intersects slows when add buffer in PostGIS

I have a table containing rasters for the whole of the UK, the below query is very fast (0.1 seconds) and gets all of the rasters that are intersected by the line between a start point and an end ...
1
vote
1answer
21 views

SLD styling rule for first and last geometry feature in PostGIS table

Writing a SLD file to style a Points layer which I publish as WMS with GeoServer, is it possible to specify a rule that is only applied to the first and last features in the underlying PostGIS table? ...
1
vote
1answer
55 views

Is there any method to retrieve SQL queries into a GeoJSON file using JSP?

I want to display the contents of my PostGIS database of various shape-files in leaflet pop-up dynamically. I know there are static methods available that retrieves attributes. But I need to by ...
0
votes
1answer
55 views

I have not found shp2pgsql in postgis installation

I have been installed postgis following this guide. All is OK. SELECT postgis_full_version(); "POSTGIS="2.1.7 r13414" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, ...
0
votes
1answer
83 views

How to bring my PostGIS map from GeoServer to Leaflet based web application?

I have created a group of shape-files using QGIS and I have stored their corresponding information in PostGIS database by importing the shape-file into pgAdmin3 using shape-file and DBF loader. Then I ...
1
vote
1answer
45 views

How to fix “Detected out of bounds geographic extent”

I hope someone can help me to solve this problem. i want to make a map with TileMill v.01, when i try to add layer using shapefile (i use QGIS to edit *.shp file) or postGIS i always get error ...
0
votes
2answers
32 views

Create point on a line with given distance from end in PostGIS

Does anyone know how to create points along a line (MultiLineString geometry) with a given distance in PostGIS? I'd like to create points at a regular distance over a line, which represents a ...
0
votes
0answers
34 views

Method to translate PgRouting to ESRI Network Analyst network dataset?

I have a network dataset in a PostGIS database that is set up and routable via PgRouting. I would like to take this dataset and import it into Network Analyst in ArcMap in order to make some ...
1
vote
0answers
30 views

Server-side map generation from postGIS database

I have loaded some OSM data into a postGIS database, using imposm. Now using this data base, I computed a value associated to every point of the map (could be anything, real-estate average price or ...
1
vote
0answers
32 views

OS Terrain 50 into Postgresql/PostGIS for lat/long analysis

I am performing analysis using line of sight's and followed a very useful blog post at http://davidrowley.blogspot.co.uk/2013/08/calculating-line-of-sight-with-postgis.html which detailed how to load ...
1
vote
1answer
26 views

Error when creating new view using ST_Union (PostGIS)

I have a table in PostGIS (2.1.7) containing adjacent multipolygons, and I'd like to create a view containing polygons which are merged versions of the multipolygons based on some field value. I ...
2
votes
2answers
77 views

Why the execution of a query is very slow using PostGis?

I'm applying this Query to 8257800 point but it's taking 15 hours and it didn't return a results. SELECT a.gid , b.gid, st_distance(a.geom,b.geom) FROM shp1 a, shp2 b where ...
0
votes
0answers
19 views

Cannot draw geometery on WorldWind

I'm trying to draw my geometery on worldwind but it keeps saying WARNING: Unspecified coordinate system and draws a default blue line in the middle of nowhere. The procedure is that I populate ...
0
votes
1answer
34 views

how to insert area of polygon into a column named area in a polygon map in cartodb?

SELECT ST_Area(the_geom) FROM cartodb_query gives the area but trying to insert it into an area column using: UPDATE cartodb_query SET area = ST_Area(the_geom) doesn't work.
0
votes
1answer
52 views

where to download gdal_polygonize.py?

I am trying to help out a friend of mine. She learnt GIS in school in the past using ArcGIS but has recently installed QGIS package on her Mac OSX. When she tries to render raster into shape file, ...
0
votes
0answers
22 views

Need to find polygon info from postgis

After importing shapefile into postgis I got geom data as MultiPoligon Like: ...
1
vote
1answer
42 views

Postgis 4D Range Query

Is it possible to express a 4D range query in Postgis? I would like to know what 4d points lie within a hypercube. This is my table: CREATE TABLE myTable ( point geometry, attrib ...
0
votes
1answer
42 views

Create blank table from unix shell

I am in the middle of trying to create my first PostGiS database and seem to be running into problems developing scripts to automate importing the various spatial formats so I can use them in my ...
5
votes
1answer
76 views

Can I identify if a point is inside a volume in PostGIS?

We are currently investigating PostGIS as an option to look up three-dimensional blocks which contain a point (and later also lines). At this point in time I cannot see any functionality that operates ...
1
vote
1answer
34 views

In PostGIS, why does ST_Covers return f on this query?

In general this query functions fine. In my PHP application I tested it with a large number of points, and they all seemed to be true or false as appropriate (when I pasted data into two online WKT ...
6
votes
1answer
149 views

PostGIS polygon edge analysis (orientation, edge length)

I am rather new to the world of GIS and especially PostGIS, so please excuse me if the answer seems evident... I would like to do analysis on a number of buildings. One thing I am interested in is ...
1
vote
1answer
23 views

Fail to display correctly newly inserted data in PostGIS on Geoserver

I have created a postGis store in Geoserver. I have created layers with points and lines and I display them on an OpenLayers based application. I also use an FME workflow to insert new data to my ...
0
votes
0answers
23 views

Getting connected points in intersection from OpenStreetMap using PostGIS?

I'm trying to get the points that connected with the intersections. suppose that I know the point of the intersection (if we see in the pictures, I represent the intersections as black node). Now ...
0
votes
1answer
32 views

Query table names

I want to query a table in my postgis table named Seg_060_2009 using psycopg2 and cant seem to get my query to execute. The query will execute if I name the talbe layer. Are there restrictions on ...
0
votes
1answer
33 views

Loop through table, look for word in text field, set boolean true if word exists

I want to create a function that loops through a table and checks if a specific word exists in a text field. If it does, the function should set a Boolean field true. This is what I've come up with. I ...
0
votes
0answers
46 views

Splitting lines table using point table in PostGIS

My problem is that I want to get the shortest route between multiple point pairs which are stored in a table (PostGIS). In PostGIS I also have a network created using pgr_createTopology on a table ...
0
votes
1answer
43 views

Spatial join points and polygons in PostGIS

I have two spatial data sets in PostGIS tables: polygon grid (table: grid_jakarta) points (table:tweets) For each point in 'tweets', I want to retrieve the reelvant attribute 'gridID' from the ...