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

learn more… | top users | synonyms

1
vote
0answers
9 views

Missing XML Attributes in Geoserver

I've imported a number of files that used to be in KML format into geoserver after putting everything into a PostGIS table. Now I would like to use CSS style information that was associated with the ...
0
votes
0answers
25 views

driving time to the nearest facility using pgrouting

I'm using pgrouting 2.0 and postgis in postgresql. My problem is to calculate the driving time to the closest facility for each node of my OSM derived network. These are the steps to be implemented ...
-2
votes
0answers
17 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
23 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 ...
2
votes
1answer
32 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
12 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: ...
1
vote
1answer
94 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?
0
votes
0answers
23 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 ...
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
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 ...
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 ...
2
votes
1answer
16 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
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 ...
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
55 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
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 ...
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
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
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 ...
3
votes
3answers
39 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 ...
1
vote
2answers
42 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
49 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 ...
1
vote
1answer
21 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 ...
2
votes
0answers
51 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
19 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
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 ...
2
votes
1answer
35 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. ...
0
votes
0answers
23 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 ...
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.
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 ...
2
votes
1answer
34 views

ST_Union based on attribute

I have a road network of center lines of MultiLinestrings.They have nodes at every intersection. I try to understand how I can merge roads together that have the same category as attribute (There are ...
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 ...
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
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 ...
1
vote
0answers
10 views

Postgis ST_AsSVG renders a tiny SVG

I am storing information about a person's journey as a linestring. Having recently discovered ST_AsSVG I tried the following query: SELECT ST_AsSVG(path) FROM activities WHERE id = 209 ...
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), ...
0
votes
1answer
16 views

PostGIS: Invalid Input Syntax for Type Double Precision

I have this query that is trying to update my geom column that's built off of lat and lng coordinates UPDATE main_table SET geom = ST_SetSRID(ST_MakePoint(lng, lat) ,4326); However it returns that ...
0
votes
1answer
54 views

What command to use in PostGIS to get same result as ArcGIS?

I have two shapefiles and i'm trying to do simple spatial analysis. When I want to know which polygon belongs to other polygon in other shapefile I always use select by location and in Spatial ...
2
votes
0answers
26 views

match noisy GPS data to closest linestring in road network [duplicate]

I have some noisy GPS data(Points) that they are not exactly on the road because of the noise. But I want to match them to the closest road linestrings. How to do this in PostgreSQL? Data: ...
2
votes
1answer
46 views

Spatial Join to count points in polygons in lat/lon

I have a table, called pets, with lats and lng coordinates and variables and a table that was created by uploading a shapefile, called city, with columns left, right, top, bottom, lat, lng, and geom. ...
0
votes
1answer
31 views

I'm not able to add SQL file to postgresql database

I started with basics and did these steps: createdb -U postgres -E UTF8 -O Peete gis -OK createlang -U postgres plpgsql gis (was already installed) -OK psql -U postgres -d gis -f ...
2
votes
1answer
78 views

Trouble using ST_Difference to remove overlapping features

I am trying to use ST_Difference to create a set of polygons (processing.trimmedparcelsnew) that do not contain any of the area covered by another set of polygons (test.single_geometry_1) using ...
1
vote
1answer
35 views

In PostGIS: How to delete completely overlapping polygons?

I would like to eliminate overlapping polygons from a table that is often updated with new polygons, but only if a certain attribute has a higher value. If this higher-priority polygon only partly ...
1
vote
1answer
31 views

CartoDB (PostGIS) near function (distance) points to polygons

I have a CartoDB map here: Link: https://dms2203.cartodb.com/viz/78db6c02-3148-11e5-a42f-0e018d66dc29/public_map I'm trying to find the distance of the points to the polygon. If the points are ...
1
vote
0answers
19 views

Unable to load Postgresql spatial data in R (with rgdal)

I'm trying to load spatial data from a postgresql database in R, using functions from the package rgdal, but I'm having trouble getting the functions to work. For example, when trying to read a ...
1
vote
1answer
24 views

PostGIS nearest point with LATERAL JOIN in PostgreSQL 9.3+

I need to obtain on each element on one table the closest point of another table. The first table contains traffic signs and the second one the Entrance Halls of the town. The thing is that I can't ...
2
votes
0answers
20 views

Are there methods of filtering gps-data with metadata?

In our project we captured GPS-tracks from subjects in the timeframe of a year. In total we captured around 13000000 GPS-points this way. The captured data comes from an electric powered car and is ...
2
votes
1answer
24 views

Attaching way id to SVG XML from GeoServer/PostGIS for postprocessing?

I render my SVG from Database Layer (PostGIS). I suppose there is basically 1-to-1 match between the ways (polygons) in DB and SVG path elements. Is it possible to attach the way id to the SVG XML ...
4
votes
1answer
52 views

Is there a difference in results between Simplifying a geometry by different projections?

We have geometries in a PostGIS database projected in srid 4326. We need to have these geometries simplified with ST_SimplifyPreserveTopology. My question is whether this geometry needs to be ...