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

learn more… | top users | synonyms

1
vote
0answers
14 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
132 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
28 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
60 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
29 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
55 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
35 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
93 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
40 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
35 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
25 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
31 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
27 views

Are there methods of filtering gps-data with metadata?

In our project we captured GPS-tracks from a few electric vehicles in the timeframe of a year. In total we captured around 13000000 GPS-points this way. The captured data comes from electric powered ...
2
votes
1answer
28 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 ...
5
votes
1answer
58 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
43 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
30 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
38 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
38 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
56 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
31 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 ...
6
votes
0answers
75 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
23 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
34 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 ...
4
votes
0answers
52 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
39 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
80 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
129 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
44 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
83 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
29 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
32 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
89 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
28 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 ...
8
votes
1answer
110 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
67 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
61 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 ...
3
votes
1answer
179 views

Map-server Very Weak Performance Vs Geo Server - Why?

I search for a good wms server that support Postgis at the end I found Mapserver as the fastest and best choice. Every performance test say it's faster than Geoserver because of its native compiled ...
0
votes
0answers
37 views

How to reconstruct a network with multipart edges to a network with singlepart edges

I have a network shapefile that between its vertices , there are edges that have multiple geometric objects. When I try to node it in postgis, it creates multiple segments in the database that ...
0
votes
0answers
29 views

Use of constraints and Spatial indexes in Postgis

We'are using Postgis to manage our geo data. They are coming from several sources, like Open street map, VPF, Shape and so on. We have defined constraints on the tables, and spatial indexes on ...
1
vote
0answers
18 views

Enable 3D viewer in geo explorer-geo server

I am trying to enable 3D viewer(google earth) in Geo explorer-geo-server by installing google earth plugin but doesn't work . any ideas ?
0
votes
1answer
55 views

Postgis geometry column with different srid

I have a table that has geometry column named the_geom. I set SRID value to 29903. And I used Openlayers api to view data on map. I set map srid as 29903 and works well. But if I need to show my data ...
1
vote
2answers
76 views

Is there any tool to execute Postgis-like queries without a postgres server?

I would like to know if there is any way/tool of using geoprocesing queries like the ones you use with POSTGIS but without the need of having an actual database server available. The particular ...
2
votes
1answer
40 views

Osm2pgsql: Error Loading in north-america-latest.osm.pbf

I've had my OSM Tile server working great for several days now, but just with Indiana. I decided to fill the gis database with all of North America. I run the following command: sudo -u user ...
10
votes
2answers
213 views

How to create dynamic leader lines?

I'm trying to create dynamic leader lines by using a PostGIS view in addition to the QGIS „Move Label“ tool. CREATE VIEW leader_line AS SELECT gid, ST_MakeLine(geom, ...
2
votes
1answer
53 views

Get nearest node following segment

I am trying to get the nearest node from a point(Id 1) . The coordinates (lat/long) are input by an user . I am using some functions like pgr_nearest_node() or get_nearest_node() from get_nearest_node ...
3
votes
1answer
82 views

Live data on a web based GIS

I'm looking to implement a 3D/2D tactical display in a browser. This should be capable of plotting maybe 100 tracks and their histories with 0.5 second updates. I've researched the available ...
1
vote
0answers
54 views

PostGIS: intersection of a polygon with 2 rasters

I'm trying to get the intersection of a Polygon with 2 raster layers in PostGIS. The rasters have the same size and pixel size and I'd like to retrieve for the polygon a list of something like that: ...
0
votes
0answers
38 views

Snapping feature nodes doesn't work after feature creation (filter involved)

I've experienced a strange behaviour during editing mode: I have set a filter to 2 features (polygons), part of on of my PostGIS layers: "name"='A' OR "name"='B' After that I have created a new ...