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

learn more… | top users | synonyms

0
votes
0answers
7 views

pgRouting not returning node with correct z-value

have an issue with pgRouting that I've modified to consider multi-floor indoor areas. I've created a mock floor plan of any typical hotel. I copied the floor plan and assigned a different z-value to ...
1
vote
0answers
27 views

raster2pgsql error

I am attempting load ~500 rasters in a PostGIS table. They are .Hdr/.dat files. I am using raster2pgsql. I am able to load the first 260 rasters, but the remaining rasters fail with the following ...
0
votes
1answer
15 views

PostGIS : ST_Contains doesn't work after ST_FlipCoordinates

I'm using postGis in a personal project, mainly to determine if a point is inside a Polygon. I realized I was using lat/long instead of long/lat for creating my polygons and using ST_Contains. Thus i ...
0
votes
1answer
9 views

How to get ST_MakeLine ready for QGIS?

CREATE VIEW new_line AS SELECT point1.gid, ST_MakeLine(point1.geom, point2.geom) FROM point1, point2 WHERE point1.gid = point2.gid; It's possible to load the layer but QGIS says 'There is no entry ...
0
votes
1answer
23 views

find the population density of some points in qgis/postgis

I have the tiger census data of population density in each block group. I also have a different kind of data: traffic accident data, where an accident has a lat/lon pair. My goal is to find the ...
0
votes
1answer
32 views

What is a MultiPolygonZM geometry type?

My imported shapefiles (shp2pgsl) have the geometry type "MultiPolygonZM". geom geometry(MultiPolygonZM), What is this type of multi polygon? I can't find any useful information.
1
vote
2answers
188 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
0answers
24 views

How to create buffer around points stored in PostGIS and served through geoserver [on hold]

I have a PostGIS database with a table with point geometry. I am showing these points through Geoserver using OpenLayer2.13. What I want to do is to create a buffer around these points. How can I do ...
2
votes
2answers
92 views

Merging linestrings in QGIS using PostgreSQL and PostGIS

I've to merge all linestrings from a PostgreSQL table "river" where not more than two start-/endpoints are overlapping. In the illustration below I use a "M" to mark all linestrings that needs to be ...
4
votes
1answer
161 views

Routing problem finding shortest route to line

inspiration on how to solve this problem. (Ascii art, I don't have points to insert picture) I need to find Z Z = Shortest route from X Using Road (no point exists here) O = The points that makes ...
2
votes
1answer
56 views

How to create a sequence for a table which was created by selecting data from another table?

I have created a new table by selecting data from an existing table: CREATE TABLE polygon2 AS SELECT gid, geom FROM polygon1; CREATE SEQUENCE polygon2_gid_seq; SELECT SETVAL('polygon2_gid_seq', ...
0
votes
2answers
169 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) ...
1
vote
1answer
39 views

How to compute equality of polygons in PostGIS independently of their orientation?

I tried some functions in postgis. Scope of work, get the equality of two shapes, independently of their orientation in the space. I detect the shapes from autocad and of course in lifetime of a ...
1
vote
1answer
176 views

Connecting to PostGIS (LATIN1) from Microsoft Access 2010 - Encoding problem?

I want to connect to a PostGIS table Using MS Access. The table has been created using the PostGIS Shapefile loader in pgAdmin. It has been encoded at LATIN1 (it wouldn't load with UTF-8 default). I ...
11
votes
2answers
4k views

How to Export Feature GeoJSON from PostGIS

I'd like to do a GeoJSON dump of a PostGIS table, but I want to export features (the geometry and the properties) not just the geometry. I've been digging into the ST_AsGeoJSON function but it looks ...
1
vote
1answer
266 views

Building web application to get PostGIS query from user and view result map using GeoServer via OpenLayers?

I'm a newbie in web-map application area. I just found the small application in this tutorial interesting I am a bit confused, because when i publish a map using geoserver and openlayer, I have to ...
1
vote
2answers
218 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
29 views

trigger postgis and dump qgis 2.8.2

I created a trigger that checks if geometry is valid on insert and update. create or replace function check_geom() returns trigger as $$ begin --insert a polygon IF st_isvalid(new.geom) = 'f' ...
0
votes
1answer
34 views

Polygon area calculation in Ruby (on Rails, rgeo, PostGIS and GEOS) in sqare meters

In a Ruby-on-Rails application, I need the area in square meters (or any other surface measure, be it ares, hectares, square kilometers, but not in pseudo surface measure like square degrees) of a ...
1
vote
1answer
52 views

St_Difference between raster and vector using PostGIS

I want to calculate the difference between a raster and vector layer, I used this querie but it's so slow and I don't know if it's right or not. I'm not using st_difference because it only support ...
0
votes
0answers
26 views

Reprojecting in Postgis

I try to reproject a layer in PosGIS using statement: UPDATE <table> SET geom=ST_Transform(geom, 3857); leading to error message: ERROR: transform: couldn't project point (574415 6.22508e+006 ...
1
vote
2answers
172 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 ...
1
vote
0answers
27 views

Make a line from a set of GPS points close to a specific GPS point with PostGIS

I have to develop a map-matching algorithm. At the moment I only match GPS points with the closest road segment. I'm looking for a way to compare the directions between a GPS point and a road to ...
1
vote
1answer
139 views

Openlayers wfs no fid being passed from tinyows

I have a webapp - OpenLayers<->tinyows<->postgis. With 1 layer I have a problem. On localhost all works well - here is a snip of the xml I get back: <gml:featureMember> <tows:trad ...
1
vote
0answers
27 views

What is the fastest way to select oldest, unique geometry from a table containing duplicates in PostGIS?

I have an output from an ArcPy arcpy.Union_analysis operation and for the overlap polygons that were created I need to select out the oldest feature (along with the attributes). The result is 75740 ...
0
votes
0answers
10 views

Error in osm.xml while generating the output xml for tile server using generate_xml.py

I'm setting up my own tile server using PostGreSQL, PostGIS extension, mapnik and osm2pgsql. While trying to generate the xml by using the command: E:\>python generate_xml.py download_osm.xml ...
0
votes
0answers
21 views

Finding a substring within a table of data between 2 string positions in PostgreSQL

I am trying to populate a view in PostGIS and in this view I want it to contain a substring based on 2 string positions. See below for my code. CREATE OR REPLACE VIEW vw_actions AS SELECT ...
2
votes
0answers
15 views

Add individual fields to delete-log-trigger when deleting PostGis-Objects via QGis

I am using a PostGres Database with PostGis extension (on Windows). QGis serves as a client to access (visualize and edit) certain database-tables. I need to create a delete-log-table that saves all ...
2
votes
1answer
184 views

Creating a postgis database a GML application schema

Is there any open Source tool(automated or semi-automated) that converts GML application schema to a POSTGIS database/table .Specifically I have a huge application schema containing many ...
3
votes
0answers
34 views

How to develop QGIS Plugin to fully run Spatial Queries With PostGIS?

I'm developing a QGIS plugin that fully run spatial queries with PostGIS. Actually I developed all spatial queries wish need some adjustment. I'm looking for some ressources or documents to know how ...
2
votes
1answer
600 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 ...
0
votes
1answer
143 views

Mapserver openlayer postgis spatial data are in postgis but label I want to display from webservice

My database of spatial data wkb is in postgis and my textual data is in sqlserver now is it possible to show labels through webservice. I have common id in both the database through which I can join ...
0
votes
1answer
21 views

Enabling: Raster and Topology

I'm new to GIS and tile servers. I've installed TinyOWS pretty successfully except for what looks like to be some dependency issues. I have installed PostGIS and also PostgreSQL. PostGIS is supposed ...
0
votes
0answers
15 views

Issue when creating points with php and entering them in postgis

I pass some data to a postgis table defined as: CREATE TABLE categoriesdata (id serial NOT NULL, name character varying(200), geom geometry(Point,4326), CONSTRAINT obj_geom_pkey PRIMARY KEY ...
0
votes
1answer
92 views

PostGIS Best Practices with thousands of entries

I'm creating a PostGIS database which will hold thousands of different shapes (imported from Shapefile, GeoJSON, etc), and they'll stay there and be queried over time. Do I need to create a ...
4
votes
2answers
336 views

How to add sfcgal to an already postgis enabled database

I have a postgres 9.1 database with postgis 2.1, and I recently needed to add sfcgal to it, so i rebuilt postgis 2.1, but I can't find out how to update the postgis extension in postgres without ...
1
vote
0answers
10 views

Recentering a tiled raster table in PostGIS?

Does anyone know a nice and easy way to recenter a tiled raster table in PostGIS? By recentering I mean that I have a raster that is centered on the Pacific, but I need to recenter it on ...
1
vote
1answer
383 views

pgrouting php problem “pg_fetch_result(): Unable to jump to row 0 on PostgreSQL result index 3”

I'm trying to build a simple routing web-app using pgrouting, followed some tutorial and the latest workshop. Because I'm using PostgreSQL 9.3(x64), Postgis 2.1.1, and pgrouting 2.0 so I did some ...
2
votes
1answer
19 views

How to obtain WGS84 or Projected Bounds for given EPSG in postgis?

On the http://spatialreference.org, for almost all SRS are definied WGS84 Bounds and Projected Bounds. How to obtain this bounds from postgis? Spatial_ref_sys does not contains this information.
2
votes
2answers
61 views

Find all polygons containing points specific criteria

I have searched for a bit, but couldn't find an answer for my question. So I have two tables (PostGIS), one containing points, and the other containing polygons. Right now i have this query for ...
0
votes
0answers
16 views

Error installing GDAL on Centos 7 [closed]

I'm trying to install Postgis/GDAL on CentOS using yum, but there are broken dependencies. I've looked around and everybody says I should install EPEL, but I've already done that. (see also: Install ...
0
votes
0answers
16 views

Mirrored shape in postgis

I'm troubling with save of shapes in db. The shapes are steel sheet cuts, with may be holes, therefore are collections. I decided to solve to my self the problem, to allow the easy exportation between ...
1
vote
1answer
27 views

How to check if a node is in route computed with pgRouting?

I'm new to the GIS system and I'm following the pgRouting workshop. I've imported the locations of nodes (points, highway=street_lamp) using osm2pgsql. now I'm calculating a few paths between two ...
6
votes
6answers
5k views

Open Source equivalent to Collector for ArcGIS to use with QGIS/PostGIS?

From my reading of the Esri web pages the Collector for ArcGIS is tightly tied to that platform. I would be delighted to learn that I am wrong about this. I have a strong interest in generic mobile ...
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 ...
0
votes
0answers
15 views

Calculating slope from elevation returns hole when using ST_Slope in PostGIS

I have rasters from the National Elevation Dataset loaded into a PostGRES database and am using the built-in function ST_Slope to calculate the slope. However these contain many holes where there is ...
1
vote
0answers
18 views

Optimize PostGIS query, ST_Intersects - Raster and Geom

I am trying to run a spatial query between two tables. Table one (prism_ppt_monthly - see below for details) is monthly precipitation data. Table two (usgs_basin_boundary - see below for details) are ...
1
vote
1answer
109 views

How can I speed up a slow ArcGIS Server 10.2 - PostgreSQL (9.2) ST_Intersects query?

I am troubleshooting a slow st_geometry query in Postgres 9.2 that uses ST_Intersects--a basic Select from table where ST_Intersects type query. table_extent ...
0
votes
0answers
32 views

Windshaft + Postgres to read geojson

I am using Windshaft and trying to figure out how I can take a geojson text object from Postgres and have it rendered as a tile layer. I have tried the following query: sql: "select ...
6
votes
2answers
221 views

How to sample a 3D raster along a 3D path (or 4D raster along 4D path)?

I have a 3d raster dataset of atmospheric variables (lat x lon x altitude). I would like to sample this raster dataset along a 3d path. Any idea how I can achieve this, preferable with qgis or ...