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

learn more… | top users | synonyms

0
votes
0answers
8 views

My OSM country roads network is not routable

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
21 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
21 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 ...
3
votes
1answer
59 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
52 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
59 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
62 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
56 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
89 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
31 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
64 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
37 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
29 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
50 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
57 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
40 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
41 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
91 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
39 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
0answers
16 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
25 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
17 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
52 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
31 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
45 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 ...
1
vote
1answer
40 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
15 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
15 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
21 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
67 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
33 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
25 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: ...
3
votes
1answer
74 views

How to handle large amounts of points

I'm using Postgres 9.4.4 with Postgis 2.2.1., my issues is that i have about 3 million of points i want to fetch and display on a map with leaflet. The problem is that those are too many points, what ...
3
votes
0answers
56 views

Import Large Shapefile to Postgres

I'm trying to import a large dataset to Postgres, of about 600MB, that sits on a remote AWS server. But I get the following error Not enough memory to allocate requested memory (nRecords=26923892). ...
1
vote
1answer
29 views

GeoDjango - save two Point fields, one for geography and one for geometry

Most of the explanations I've read for geography and geometry seem to suggest that one must only use either geometry or geography, and that the only way to use both is to cast/convert between one and ...
3
votes
3answers
662 views

Why is geography faster than geometry for distance calculations?

Intuitively, I thought geometry would be faster than geography distance calculations, but this says otherwise: ...
1
vote
1answer
23 views

Syntax error at or near “1” — PostGIS in Action — Chapter 11 SQL data dump

I'm following along with PostGIS in Action, 2nd ed., chapter 11, while attempting the SQL dump from the data files and I'm getting the following error: ERROR: syntax error at or near "1" LINE 189: 1 ...
1
vote
1answer
23 views

Load postgis database with PK from two fields in QGIS [closed]

I have a PostGIS database having a Primary Key from two fields id_cat and id_cdad. When I load this database in QGIS in my computer under Linux there are no problem. I unmark "Select ID" and I can ...
0
votes
1answer
37 views

how to debug mapserver / postgis returning 0 results? ( MapServer WMS 1.1.1 / Google Earth / QGis )

user30184 answered the same question here Why is mapserver returning a blank image? user30184 answers to start by specifying SRID and that it often has to do with extent and projection. I imported a ...
3
votes
2answers
46 views

Does Oracle Spatial calculate geodetic distance?

I've got to migrate a PostGIS database to Oracle Spatial, and am stuck on a problem: In a view, I have a column that amounts to ST_Distance(geography(geom_1), geography(geom_2)), effectively ...
2
votes
2answers
35 views

PostGIS Address model/schema industry standard?

Is there an industry standard or best practices for a database of Addresses? I've searched for examples of Address models, and all I've found are very barbaric models that have something like address ...
3
votes
1answer
49 views

How to cast geometry to varbinary in PostGIS / PostgreSQL

In MSSQL Server, casting geometry to varbinary(max) produces a string that looks like this: 0x3D0B0000010CA0F3BE3B5CE9474100EC414E3AF93941 When you insert that string into a geometry column, a ...
4
votes
2answers
73 views

How to display vertex markers in QGIS for non-editable layers?

I've a PostGIS layer with read-only privileges. Is there any way to display the vertex markers of the layer?