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

learn more… | top users | synonyms

0
votes
1answer
11 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
vote
0answers
34 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
14 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
31 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
17 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
34 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
26 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
32 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
1answer
23 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
0answers
22 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
25 views

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

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 ...
2
votes
1answer
78 views
+100

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
15 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
53 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
45 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
71 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
31 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 ...
0
votes
1answer
27 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
22 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
19 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
23 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
51 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 ...
1
vote
2answers
31 views

GeoJSON from PostGIS for Vector

Based on the following code block: var SphericalMercator = require('sphericalmercator'); var mercator = new SphericalMercator({ size: 256 }) var bbox = mercator.bbox( +req.params.x, ...
0
votes
0answers
28 views

Enable PostGIS extension on Ubuntu 14.04.2

I have troubles enabling PostGIS extension on Ubuntu 14.04.2 and PostgreSQL 9.3. I have installed the packages with this step by step procedure. PostgreSQL and pgAdminIII seem to be installed ...
1
vote
0answers
31 views

Is it possible to perform spatial join in PostGIS and keep all features?

I am attempting to create an employment change map using a hex grid. I have individual establishment data as points with attached employment figures. When I ran the spatial join using the postGIS ...
0
votes
1answer
30 views

Spatial query ST_CONTAINS returns empty result

I want to create a database view in Postgres/PostGIS which returns a subset of the points stored in another table called locations. The subset is defined by an area stored in yet another table called ...
1
vote
2answers
43 views

Adding additional geometry column in PostGIS

I'm importing many sets of geodata into PostGIS, and they have different SRID's. (Some have EPSG:3857, some EPSG:4326, some something else). I'd like to create an additional geometry column, eg. ...
0
votes
1answer
18 views

How to set the target schema using osm2pgrouting

Is it possible to set the target database schema using osm2pgrouting? After some debate and troubleshooting, I've decided to host my OSM-based pgRouting data in the same database as the rest of my ...
5
votes
0answers
51 views

Best way to cut linestrings with points

i was checking the best way to cut linestrings by points. The scenario is: lots of streets, need the segments cut by intersect points, kind of this: I got linestrings (full uncuted by points) ...
0
votes
0answers
21 views

Return nodes along portions of edges with pgrouting

I have been experimenting with generating isochrones with pgrouting using osm data. So far, I have been able to generate isochrone polygons by getting the concave hull of the nodes returned from the ...
0
votes
1answer
20 views

Tweaking the table after shapefile import?

I'm importing shapefiles to Postgresql with the shp2pgsql command line tool. shp2pgsql -s 3035 -W "latin1" foo.shp | psql Should I do some table (SQL) tweaks after that? Or is the import fine after ...
0
votes
0answers
30 views

Cannot find information about my.table table in raster_columns

I am running PostgreSQL 9.4 and PostGIS 2.1 and have loaded a small piece USGS SRTM data for North America successfully into my database. I am attempting to export a small piece of of the rasters I ...
3
votes
0answers
45 views

How to speed up simultaneous working with PostGIS layers in QGIS?

we are working on one big layer at the same time (10-20 people). Some of us use QGIS 2.8.1 and the other 2.6. The user with 2.8 have a lot of crashes (QGIS). The 2.6 users don't have this crashes but ...
1
vote
0answers
22 views

How to install PostGIS shp2pgsql-gui on openSUSE 13.2?

I installed PostgreSQL 9.4.4 together with pgAdminIII (1.20.00) and the PostGIS extension (2.1.7, via the Stack Builder) from http://www.enterprisedb.com/products-services-training/pgdownload on my ...
2
votes
2answers
63 views

PostGIS spatial view getting points within distance interval from line

I have a point table (addresses) and and line table (coastline) in PostGIS. I would like to build a spatial view selecting the points that's has a minimum distance of 600 meters from the line and a ...
4
votes
3answers
116 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: ...
0
votes
0answers
42 views

PostGIS ST_Intersects not returning values

I recently installed the PostGIS extension for a rails app that i'm working on. Currently, i am trying to get all the polygons that intersect the vieport of the Google Maps. On running the (see ...
0
votes
0answers
64 views

Problem with ST_IsValid: Unknown geometry type: 9 - CompoundCurve

The following is an example of a gml:Curve that was loaded into Postgres using FME. <gml:Curve srsName="urn:ogc:def:crs:EPSG::27700" gml:id="os.vmd.ny.38124.geom"> <gml:segments> ...
1
vote
0answers
23 views

how to create Topology table?

i have gis database called Madar in pgadmin with postgis and pgrouting extension, all the data inside gis database already inserted by shp2postgre tool , what i really need now is how to make topology ...
0
votes
1answer
28 views

PostGIS ST_Buffer a polyline?

I am trying to run a buffer around a polyline (geography). My first attempt below (based on ST_Buffer documentation: SELECT ST_Buffer(ST_Geomfromtext(i30.geog),10,'endcap=round join=round'); gives ...
0
votes
1answer
55 views

Starting Tile Sever Rendering Error: OSMBright.xml

I was following the entire process found here: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/ I have an error though on Testing your tileserver part where i run the ...
1
vote
0answers
20 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 values, and dates are not used by QGIS 2.8.2 correctly. ...
8
votes
1answer
101 views

Building a polygon over a reachable area

I am currently working in the field of isochrones and the underlying algorithms. What now causes problems is not the calculation if the isochrone itself, but the visualization of the results. The ...
2
votes
2answers
63 views

How can i update postgis data from shp?

Now,I know how to insert a shapefile to PostGIS by using shp2pgsql.exe. If I have an updated shapefile and I only want to update the updated rows, how can I know the table being updated?
0
votes
2answers
55 views

Index a Table with Geometry Column

I have a table called Stores with 10k rows which has a column location geometry(Point,4326). CREATE INDEX "Stores_spatial_gix" ON "Stores" USING gist (location); Upon KNN query explain analyze ...