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

learn more… | top users | synonyms

-1
votes
0answers
5 views

Information on GIS application testing [on hold]

I am new into GIS application testing. I want to understand the GIS testing key characteristics.
0
votes
1answer
9 views

Problems with PostGIS St_closestpoint function

I'm trying to find the closest point in a line from an insertion point closest to it. To do it, in the middle of the function I use select id from rede_viaria.t_rviaria_via vias where ...
4
votes
3answers
121 views

Why is ST_Distance_Sphere using WGS 80?

PostgreSQL's ST_Distance_Sphere function calculates the distances on earth: float ST_Distance_Sphere(geometry pointlonlatA, geometry pointlonlatB); In its documentation, there is a peculiar note: ...
1
vote
1answer
144 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
1answer
89 views

How to SELECT all points within a GeoJSON polygon in PostGIS

I have a GeoJSON polygon, and a table with lots of points. I want to SELECT all points that are within an arbitrary GeoJSON polygon. How can I do that with PostGIS SQL?
2
votes
1answer
26 views

How can I do a subquery inside a subquery in PostGIS?

I need to add a subquery to a working function. Instead of select * from table, I'd like to select * from (select * from table where height>1500) as sub, something that works in other functions I ...
0
votes
0answers
9 views

Rendering Problem: OpenStreetMap Server CentOS 7

The Problem I'm trying to install an OpenStreetMap server on CentOS 7. I'm using mapnik 2.2.0 and PostGis 2.0. When I try to render the tiles for the server I get the following error: ...
2
votes
2answers
86 views

How do I make equidistant circles covering the whole globe in QGIS?

What's the simplest way to make equidistant circles in PostGIS/QGIS? (my software versions are Postgres 9.3, PostGIS is 2.1, QGIS 2.10) I tried this in PostGIS, but the circles that come near or ...
0
votes
1answer
28 views

Problem importing sqlite into Postgres (with PostGis) using ogr2ogr

I am trying to import a very large sqlite file into Postgres SQL 9.3. The first tool I tried to use was OGR2GUI (http://www.ogr2gui.ca/). The 64 Bit version does nothing, whilst the 32 bit version ...
1
vote
2answers
41 views

How to get PostGIS DB name from QGIS layer?

I'm writing a custom Processing script that needs to know which database connection a vector layer resides in. I can't find anywhere in the API a function to return this information from a layer. So I ...
2
votes
1answer
15 views

GeoWebCache tiling failing due to topology exception

I am running GeoServer 2.8 WAR on an Ubuntu machine in Tomcat 7. I have GeoWebCache integrated directly and it does cache and serve some tiles. However, in some areas I get errors when I attempt to ...
0
votes
0answers
18 views

Running a custom function on each line of a PostGIS table

I am trying to run a custom function on each parcel in a PostGIS table, (in this case its a function that finds the standard deviation value of the pixels intersecting a raster) Here is the code for ...
0
votes
0answers
29 views

Problem visualizing OSM's ways twice in leaflet

I have retrieving all types of data from a small B-box using the Overpass Api and i have populated Postgres(postGis) using "osm2pgsql" with the default style. I can extract the ways into geoJson ...
0
votes
1answer
143 views

How to dispay my PostgGIS geometry on the GeoDjango map widget?

I'm trying to display a custom map feature on a GeoDjango map. The geometry is a multipolygon stored in a PostGIS database backend. And I have trouble to find the correct piece of documentation that ...
1
vote
1answer
40 views

Convert distance from meters to EPSG 3857

I need to convert distance from meters to units of EPSG 3857 in PostGIS. This is important for me to calculate a radius for ST_DWITHIN as I'm dealing with geometries. How can I do this?
2
votes
2answers
54 views

How can I import shapefile in python?

How can I import a shapefile in python? from PyQt4.QtCore import QSettings, QTranslator, qVersion, QCoreApplication from PyQt4.QtGui import QAction, QIcon, QFileDialog # Initialize Qt resources from ...
1
vote
2answers
203 views

adding geometries to a source, target table for multiple rows in pgrouting

I am having an issue trying to perform the pgr_dijkstra algorithm and getting back a line in my table for multiple rows. I have a table that has a columns of source, target node id's but I cannot ...
3
votes
1answer
31 views

GeoServer and PostgreSQL JSON column

I have a database table with a dynamic schema implemented via a JSON column named "properties". Currently GeoServer doesn't recognize my JSON column. Is there some way to make Geoserver recognize ...
0
votes
1answer
17 views

GeoTools modify a FeatureType to change its name

I have a featureCollection and I want to save it into PostGIS dataStore. So I'm going to create a database table by geotools. I want to name my table "ali". But I can't rename the schema! DataStore ...
2
votes
1answer
48 views

How to load a style from POSTGIS in PyQt

The thing is that I have four styles I have created in QGIS through the GUI and saved into a postgresql database. I can see them in the table named layer_styles I have seen similar questions asking ...
0
votes
1answer
20 views

PostGIS - Raster - update all values - what is prefered

I have added the Raster support to my PostGIS database program. Now, I need to update all values in the raster (one band only) several times a day. I have found and tested these two options Use ...
0
votes
2answers
32 views

PostGIS - store 2D elevation data

I am new to PostGIS. How can I store 2D elevation data? I have uniform raster and for every [x,y], height is set. I want to be able to use this in my queries (something like SELECT height FROM data ...
3
votes
1answer
249 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
417 views

How to obtain closest point of point over polylines layer in PostGIS 1.4 (without st_ClosestPoint)?

I´ve got a polylines layer (pipes) and a points layer (valves) and In Postgis 1.4 I would like to obtain the closest points but exactly on the closest polyline. In other words, i need to locate each ...
0
votes
1answer
34 views

pg_dump Database that was populated with osm2pgsql

Is it possible to dump a postgres database that was created with osm2pgsql and a .osm.pbf file with pg_dump and import this into a remote postgres database? After running osm2pgsql the database is ...
3
votes
1answer
286 views

How to store data for gis system?

I'm developing a GIS solution using Postgis database and geoserver as web map server. The solution to develop will analyzes the defects (as a polygon) and process parameters values (as a linestring) ...
1
vote
1answer
143 views

Import shapefiles into PostGIS using Python with psycopg2

I want to import shapefiles to PostGIS using Python with arcpy & psycopg2 to connect to PostGIS. I don't want to use the existing shapefile loader nor ogr, just write my own import tool. My steps ...
0
votes
1answer
38 views

GDAL Python and postgis raster?

I'd like to create a postgis raster using GDAL and python. I can get the driver easily: drv = gdal.GetDriverByName("PostGISRaster") But how can I create a new raster table? I can't find any ...
0
votes
1answer
168 views

How do I explode a MultiLineString using ST_Dump() in PostGIS?

I want to do what this blog post does: explode a MultiLineString into individual LineStrings. I'm using CartoDB but don't get individual LineStrings as the result of my query. I still get a ...
2
votes
1answer
36 views

How to detect if point is on the left or right side of the line in PostGIS

I have a linestring table and a point table in postgis. I know the closest line to any given point. What I need to know is on which "side" of that line is the point. I guess I have to do that by ...
1
vote
0answers
19 views

Indexing PostGIS table by tile boundaries

I have a PostGIS table with 2M rows, all Points. I'm creating tiles from the data, but it's quite slow. Although I have the normal geometry indexes enabled on the table, I wonder if it's possible to ...
1
vote
0answers
18 views

What solutions to use QGIS as insert tool for a Postgres relationnal database?

I have a Postgres/PostGIS relational database and I would like to use QGIS as an interface for inserting data. The thing is that my database is quite complex and I need my tool to handle the following ...
1
vote
0answers
10 views

Django Postgis Distance from point

I have a point where the objcet is and another point for mylocation. I want to calculate the distance >> object_location <Point object at 0x7f9ceaac7be0> >> mylocation <Point ...
3
votes
3answers
37 views

Calculate distance with JTS

I'm trying to get the distance between two points with JTS. The problem is that this function with JTS new Coordinate(Lon1,Lat1).distance(new Coordinate(Lon2,Lat2)) Is giving a different result ...
5
votes
2answers
142 views

Is adding a new table for every layer a good design idea?

Is it a good design idea to maintain separate tables for each layer in a PostGIS database?. Every layer is defined by users. A user creates his/her layer say ATM location. Thats meant by defined by ...
8
votes
3answers
820 views

What are the Pros and Cons of hstore data type in postgis?

PostgreSQL has a module named hstore that implement the use of key/value pairs (it's something like the OpenStreetMap model, but in a single table). What are the Pros and Cons of hstore regarding GIS ...
1
vote
0answers
25 views

PostgreSQL default values in QGIS 2.8.2

I think the issue outlined in this question PostgreSQL default values in QGIS 2.8.1 and ticket #12391 is not fully solved yet. Negative numeric default values, and dates are not used by QGIS 2.8.2 ...
1
vote
1answer
20 views

PgRouting: Target vertex error

I'm trying to make a matrix that shows the cost from a node to the rest of the nodes in a network. The final result I'm looking for is not the cost, but only know if a car can or can not reach each ...
-1
votes
0answers
38 views

How to generate map using geoserver & openlayers in java from postgis data? [closed]

I am a newbie in geoserver and want to know how to render map (postgis database) in openlayers using geoserver? I want to add the base layer. I tried: var layer = new OpenLayers.Layer.WMS("OpenLayers ...
8
votes
1answer
162 views

How fast should I expect PostGIS to geocode well-formatted addresses?

How fast should I expect PostGIS to geocode well-formatted addresses? I've installed PostgreSQL 9.3.7 and PostGIS 2.1.7, loaded the nation data and all states data but have found geocoding to be much ...
2
votes
0answers
50 views

Create Indexes Within a View? How could I Speed up Spatial Queries Over a View?

I´m trying to add a view from postgis using QGIS, what´s facile. The problem is that it´s taking too long to load it and to perform any kind of operation, for example, as simple as counting rows. It´s ...
0
votes
1answer
18 views

GPS points of a vehicle snapped to a specific polyline path [duplicate]

So I have been capturing bus GPS locations for a while now, and I am became interested in snapping them to their corresponding polyline (route). While at first this seemed like an easy enough task I ...
0
votes
3answers
455 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 ...
2
votes
1answer
830 views

Problem in importing raster data from PostGIS to Geoserver

I am using Opengeo Suite 3.0.2, PostGIS 2.0.3 and PostgreSQl 9.2. I am trying to import raster data from PostGIS to Geoserver but facing an error. I follow this tutorial link to import the raster ...
0
votes
1answer
35 views

ST_Dwithin Source Code

I am looking for the st_dwithin postgis source code. I want to learn the way postgis determines whether a given geometry is within a given radius to another geometry.
0
votes
1answer
27 views

Find Overlap Between Two Polygons

I have a two shapefiles, one is a DMA level and one of US states level. How do I figure create a shape file containing DMA of a certain state, for instance, Texas from a larger shapefile. I tried ...
3
votes
1answer
99 views

How to create a trigger for multiple schemas?

One of my PostgreSQL databases contains different schemas which share the same structure. -- schema region_a CREATE TABLE region_a.point ( gid serial NOT NULL, geom geometry(point, SRID), ...
2
votes
1answer
34 views

How to find Shortest Route between two points in PostGIS without using pgRouting?

I want to find shortest route between two points stored in PostGIS database. I know about pgRouting functionalities but I don't want to use it because of data processing/topology creation processes. ...
2
votes
0answers
32 views

Calculate mean value of polygon from raster in PostGIS

I started with a NetCDF .gri and .grd raster file of the UK provided by a colleague. I clipped it in R to be only London, exported and converted to a ASC file, and then imported it to PostGIS using ...
0
votes
0answers
20 views

Extract TopoJSON directly from PostGIS

I have a simple "region" table: id (TEXT), name (TEXT), geom (MULTIPOLYGON). Here's the query I can use to extract a GeoJSON FeatureCollection: SELECT row_to_json(fc) FROM ( SELECT ...