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

learn more… | top users | synonyms

0
votes
0answers
13 views

snapping line nodes to points

I have a dataset of manholes and pipes; I want to snap the lines start and end nodes to the manholes if they are within a specified distance. Been trying to find away to do this using PostGIS or QGIS ...
1
vote
0answers
9 views

PostGIS Street Intersection Autocomplete with full text search

What I'm attempting to do is create a custom autocomplete for addresses, road intersections, POI's, etc. For now we are going to using Mapbox GL (we'll be creating a custom map at a later phase), ...
0
votes
0answers
9 views

Installing Osm2Pgrouting on debian?

I'm new to Postgis. I'm trying to install osm2pgrouting on debian, but when I run cmake -H. -Bbuild I get an error : Could not find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found version ...
1
vote
1answer
11 views

Difference in EPSG:28992 (RD/Amersfoort) definitions

I need to do some projections between WGS84 (EPSG:4326) and the Dutch RD system (EPSG:28992) in JavaScript. I use Proj4js for this. When adding the definition from spatialreference.org I noticed a ...
1
vote
0answers
24 views

ST_Intersection between MultiPolygon tables leads to gaps, missing intersections

I am trying to intersect two MultiPolygon tables, which are in the same UTM projection, and calculate the area of their intersections. I am getting some surprising results when I examine the ...
3
votes
0answers
40 views

Postgis sequence in QGIS not working

I have a Multipolygon-Layer stored in a Postgis-database. The primary key field 'gid' is SERIAL. When trying to add a new polygon in QGis (LYON 2.12.1 on OSX El Capitan), the attributes form shows me: ...
1
vote
0answers
14 views
+50

Update GeoDjango models from KML?

I'm working in Django 1.9 and Postgres 9.4 with PostGIS extensions. I have a KML file, and I want to use it to update my geo fields. This is my model: class PCT(models.Model): code = ...
2
votes
0answers
18 views

GeoDjango with PostGis: distance_lte filter is inaccurate

My view code (relevant part): location = self.GOOGLE_MAPS.geocode(lookup) if len(location): page = int(request.POST.get('page')) or 0 start = page * settings.PHOTOS_PER_BATCH end = (page ...
-1
votes
0answers
11 views

analysing height data using dem [duplicate]

i ran the following code on python 2.7: import sys, struct from osgeo import gdal from osgeo import gdalconst minLat = -48 maxLat = -33 minLong = 165 maxLong = 179 dataset = ...
2
votes
1answer
29 views

trouble restoring dump, $libdir/postgis-2.1 missing

I have a university project in which I continue a project of last year. I never used those tool and I'm getting the following error: ERREUR: n'a pas pu accéder au fichier « $libdir/postgis-2.1 » : ...
0
votes
1answer
32 views

How to select congruent polygons in PostGIS?

Title says it all. What is the best way to select congruent polygons in PostGIS? CREATE TABLE polygon_a ( gid serial NOT NULL, geom geometry(Polygon, your_SRID), CONSTRAINT polygon_a_pkey PRIMARY KEY ...
1
vote
0answers
20 views

My OSM country roads network is not routable [duplicate]

I need a routable shapefile in order to execute pgrouting algorithms. I download a national zip from http://download.geofabrik.de/europe/greece-latest.shp.zip and import the roads shapefile in my ...
0
votes
0answers
34 views

Django/PostGIS: How to insert coordinates in PointField in EPSG:27700, and return EPSG:4236?

I am using Django 1.9 with PostGIS. I have input data that consists of British National Grid eastings and northings, and a table that looks like this: class Org(models.Model): name = ...
1
vote
1answer
30 views

Coordinates translation issue (from EPSG:23030 to EPSG:4326)

I'm trying to figure out how to make some translations from UTM/ED50 to WGS84. The reason I need to do them is that my data source's coordinates are in EPSG:23030 format, and I need to represent them ...
4
votes
1answer
67 views

Inconsistent results in ST_Distance

I have been playing with the ST_Distance function available within PostGIS and to my surprise, I have encountered some rather strange behavior... In the simplest setting, I have just two tables N and ...
5
votes
0answers
55 views

1-center and k-center problem / maxmin facility problem in Post

is there anybody who has already solved the 1- and k-center problem within PostGIS (optionally with distance metric obtained by pgrouting)? References: 1-center problem in Wikipedia and graph ...
2
votes
2answers
60 views

PostGIS convert point->raster->GeoJSON

My question is a follow up to Convert a raster to GeoJSON polygons in PostGIS I'm trying to accomplish querying point data from the database, and then turn that into a raster for calculating ...
4
votes
1answer
64 views

Find all intersections of a LineString and a Polygon and the order in which it intersects it

I would like to find out all intersections of a LineString (River) through Polygons (Municipalities). I would like to list the order of municipalities which the river crosses, using linear ...
1
vote
1answer
66 views

ogr2ogr Shapefiles to Postgres SRS problem

I am trying to import to my Postgresql (9.1+129ubuntu1) + PostGIS (1.5.3-2) database a Shapefile with polygons with the ogr2ogr tool from Gdal-Bin package (1.7.3-6ubuntu3). I know the origin SRS of ...
3
votes
1answer
96 views

Update area column after changes in QGIS

I'am using QGIS and POSTGIS, for example to automatically calculate the area of a new created polygon. I do that with following code: CREATE OR REPLACE FUNCTION calc_area() RETURNS trigger AS $BODY$ ...
1
vote
1answer
32 views

print polygon from “the_geom” field in postGIS database

I have a postGIS database with plots and features (owner, area, address, etc) and I would like to print any selection of that like a card. I mean I would like to show each record in a page with the ...
3
votes
1answer
73 views

Running PostGIS ST_ClusterWithin on large dataset?

I am trying to use the new ST_ClusterWithin in PostGIS 2.2 to help me aggregate building polygons that are within 5 metres. The source data has > 13million polygons. I ran the following query on a ...
1
vote
1answer
43 views

Database Tiled Aggregation request

We have a table in MariaDB that contains a lot of point of interest. These POI have a list of numerical attribute such has occurrence, weight, etc. We are looking for a way to aggregate these POI by ...
0
votes
0answers
34 views

Modifying an algorithm in pgRouting or creating a new routing algorithm [PostGIS using OSM Data]

I am currently making a routing application that uses pgRouting, PostGIS and OSM Data. Everything works fine but I discovered that the Dijkstra algorithm in pgRouting should be tweaked a bit to be ...
2
votes
1answer
53 views

Checking if Point is inside a GeoJson polygon using PostGIS?

I have a list of points stored in my database, in a text format. lat | long "-73.88110000007934", "40.817699999744555" "-73.92675000057572","40.81840599962764" "-73.883573184", "40.751662187" I ...
0
votes
1answer
59 views

How to improve PostGIS raster query

I have this query SELECT data_type, data_time, model_name, ST_Value(raw_data, 1, 202,417) AS val_0 FROM data WHERE data_type = 'type_a' AND data_time >= '2015-12-06 00:00:00' AND ...
1
vote
2answers
41 views

Importing OSM data into PostGIS and display into QGIS

I am new to all the GIS thing but I need to set up a full GIS infrastructure for a project. I have installed a Postgres server with PostGIS. That is on ancient hardware for now, 32bits processor with ...
3
votes
1answer
37 views

Geojson in postgis Geometry : Z dimension error

i had this php code : ...
3
votes
2answers
45 views

PostGIS raster - [x,y] from lat/lon

I have coordinates in [lat, lon]. How can I convert them to the rasters "pixel" position [x, y]? I know raster top-left corner, scale and skew.
1
vote
1answer
28 views

What projection to use in POSTGIS for LAT/LONG and 'contains' queries

I would like to store latitude / longitude information in a POSTGIS database. I will need to query that data with simple contains query (for display on a map, so the bounding will be simple box) and ...
4
votes
2answers
92 views

Feature selection of one vector layer based on another vector layer: Any advice for using PostGIS or Python with PostGIS together?

I have a data set (more than 50,000+) of points (addresses) and Polyline (street) shapefiles of the area of interest. The street shapefile contains Annual Daily Traffic (ADT) data of each street for a ...
1
vote
1answer
41 views

Find Feature class into another feature data

I am trying to find the feature classes from one feature data into another feature classes. But I'm getting nothing at the end as a result of the matc statement. The data in the arc environment is ...
2
votes
1answer
38 views

Cannot edit postgis in qgis

I am currently trying to edit a layer in postgis by using qgis, but still out of luck. I don't know what I am doing wrong, and I guess it must be a very basic issue since I haven't found any question ...
0
votes
1answer
47 views

rotate point along line layer

I have two layers: point and line (postgis or shp) The line layer represent a hiking trail. The point layer the mountain passes. The points are exactly on the same position like the node of the line. ...
2
votes
1answer
23 views

QGIS Server sending UPDATE… WHERE NULL to postgis in a WFS layer

I am running a Windows Server 2012 server. PostgreSQL 9.3.5, 64-bit POSTGIS 2.1.3 QGIS Server 2.6.1-2 QGIS Desktop 2.8.3 and 2.12 I am using a Microsoft Surface Pro 4 tablet using QGIS Desktop ...
0
votes
0answers
28 views

Mix Public Transportation data with pgRouting

I'm looking to mix 3rd party data, such as public transportation (routes, schedule is optional), with geographic data imported from shapefile/osm. With this I plan to give users an option to select a ...
1
vote
1answer
26 views

QGIS - does a tool exist to calculate the (PostGIS) polygons containing a given point?

This is the converse of the analysis provided by the fTools plugin "Points in Polygon": Given a single point and a list of vector layer polygons (PostGIS in my specific case), is it possible to list ...
2
votes
2answers
26 views

Why does psycopg2 “SELECT ST_AsBinary(geom)” return “<read-only buffer…>”?

I'm trying to retrieve polygons out of a postgresql database and I'm running into several problems. First, I've been able to get ST_AsText(geom) to work in conjunction with arcpy.FromWKT(), but the ...
1
vote
0answers
18 views

Problems using pgr_fromAtoB - postgresql error

I have some trouble with the pgr_fromAtoB function of the workshop. I get: ERROR: column "ways" does not exist But "ways" is the table, not a column. What am I do wrong? My table ways looks like: ...
0
votes
1answer
54 views

PostGIS Get the POINT that is x meters away from a fixed point on the route (LINESTRING)

We have a route network stored in the routes table (LINESTRINGs). Basically every sedment (between two vertexes) is inserted as a separate row in this table. Among that we have a locations table ...
1
vote
0answers
32 views

PostGIS query: filter rows by area?

I am working with PostGIS (in CartoDB). I want to find all rows in the database with an area of over 100 square metres. I've been trying this: SELECT *, ST_AREA(the_geom::geography) AS area ...
2
votes
1answer
50 views

NHibernate spatial geometry type become NULL - PostGis

I am using postgres/postgis as db and Nhibernate as ORM on a C# project. This is the first time I try to map postgis to a .Net application. My setup uses NHibernate version 4.0.4.4000 and ...
2
votes
1answer
43 views

Storing and updating large amount of raster data

Large amount of data = ~10TB of rasters (multiple projections) with the possibility of this data growing. The basic architecture I'm planning at the moment is having 2 clusters of GeoServer--one ...
4
votes
1answer
71 views

What is XYR in QGIS?

I am familiar with XY, XYZ, and XYZM, features but I created a spatial layer in PostgreSQL and added it to my QGIS. When I opened the Vertex Editor it showed me values for XYR and I am not familiar ...
1
vote
1answer
16 views

postgis create a new layer from the st_within query for points with another layer

I am trying to create a layer that contains all of the businesses in Los Angeles proper. I have a shapefile for the polyon of the LA boundaries (shp_laboundaries) and I have a set of points in the la ...
1
vote
0answers
16 views

Import raster using raster2pgsql with out-of-db option not working

I am using raster2pgsql to import DTED data into postgis database. I would like the data to be out-of-db, I am using the command as follows. raster2pgsql -R /home/gis/elevation/DTED/area.dt2 ...
-1
votes
0answers
22 views

Export Mysql position data to PostGIS

I have a million points of position data on my MySQL database. I want to export it and put it on my PostGIS database, so I can open the data position using openGeo application. So what should I do ...
2
votes
1answer
68 views

Raster statistics for polygon areas PostGIS

I'm trying to get zonal raster statistics for each polygon area. I have used the following method from this site: SELECT bufid, (ST_SummaryStatsAgg(ST_Clip(rast, geom, true))).* FROM rasttable, ...
2
votes
0answers
34 views

How can I convert a shapefile from a single line segment to separate side segments using PostGIS?

I have a shapefile (STC) which is a single line segment per street with information for both the odd and even sides of the street. This .shp file has to be converted to separate side segments. To do ...
0
votes
0answers
26 views

Unable to install pgrouting for postgres 9.3.5/postgis 2.1.7

I am running postgres 9.3.5 and postgis 2.1.7 on Ubuntu Server 14.10. I am trying to install pgrouting, but having no luck. 1) I tried the following based in the official workshop documentation: ...