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

learn more… | top users | synonyms

2
votes
1answer
48 views

How to render mixed geometry from one table?

I have a table in postgresql with mixed geometry, but it is not accessible in QGIS. I am running QGIS version 2.8.2. Is there any plugin to install for QGIS to render multiple geometry?
0
votes
1answer
45 views

Problem with loop for pgr_Dijkstra

I try to use pgr_Dijkstra through Postgis and Pgadmin to find the shortest path in a network between a lot of nodes. So I thought I could to "automate" the process with a PLSQL query. Here is a query ...
0
votes
1answer
41 views

Error parsing GeoJson - parse error - invalid geometry

I'm trying to parse GeoJSON but getting a parse error. I've validated the GeoJSON using http://geojsonlint.com/ and http://geojson.io/. Using PostGIS 2.2.2 r14797, this is my SQL command: SELECT ...
2
votes
2answers
75 views

Start postgis (Opengeo suite azure linux vm)

I have a fresh Azure Linux VM based on Opengeo suite. The dashboard and geoserver are working. But I can't connect or configure postgis. I follow this guide. Via putty, logged in with the only ...
2
votes
1answer
37 views

How to generate rectangles considering only a percentage area of a base object?

I am trying to generate a rectangle by considering a small percentage of area of the extent of a geometry object in the PostGIS. I have tried to use the ST_Scale function. It successfully generates a ...
0
votes
1answer
55 views

Geocoding addresses based on own reference data

I have a historical addresses dataset in form: |Name |Description | Where "Name" is a single field with house number, street name, city and country. I have digitised two georeferenced ...
0
votes
0answers
24 views

PostGis - Geocode Milepost [duplicate]

I used this code to geocode milepost data and when i ran this i got result like this "01040000E0D408000000000000", so how to convert this result into Lattitude and longitude values ?? SELECT ...
2
votes
1answer
62 views

Using postgis ST_ClusterWithin() on a table

I am using the postgis ST_ClusterWithin function to cluster my spatial data in a table. I want to get the rows of the table as a result of the query clustering query (maybe the Pk's of each element in ...
3
votes
1answer
67 views

How to use search cursor in a given extent

I want to perform a selective search cursor for a feature class for a given extent. I have tried setting env.extent in the below code but it is returning the whole feature class instead of a fixed ...
1
vote
1answer
34 views

Query and display thousands of features

We have a feature table in PostgreSQL with PostGIS plugin, the table contains almost 200 thousand points. In the application, we need to query features according to different conditions (for example ...
1
vote
1answer
56 views

Lines from points in postgresql postgis

I have this table (all row aren't in order): time, id, latitude, longitude time is character varying and the format is: dd/mm/year hh:mm id, latitude and longitude are numeric I would create lines ...
0
votes
0answers
34 views

Generating polygons from lines and problem with rings

I have a problem when generating polygons from lines. I got dxf file with layers: cadastral parcels (as polygons) soil classes (as lines) Now I want to generate polygons for soil classes (so I ...
1
vote
1answer
89 views

Tableau: Using UK Shapefiles in PostGIS Database

I'm trying to use Tableau to display data. Some of this data is suitable for mapping, and therefore I'd like to create maps in Tableau to display this data. Unfortunately, neither the basic view nor ...
0
votes
1answer
50 views

select neighbour polygons in sql

I have a database of few milion records (all houses in my country). Now I want to select all records who have a neighbouring record (a house next to it) and give this a status 'T'. Each record has a ...
2
votes
1answer
86 views

Displaying data from a partitioned PostgreSQL / PostGIS table is unacceptably slow in QGIS

I have two very similar datasets of 27 million polygons stored in PostgreSQL / PostGIS. One is loaded as a single table, with spatial indexes and regular indexes on key fields. The other is ...
1
vote
1answer
43 views

PostGIS with clause not using spatial index

This query uses the spatial index and it's quite fast: explain select a.the_geom from chicago_major_streets a, stormevents_locations_2014 b where st_intersects(a.the_geom,b....
0
votes
1answer
48 views

Transform data type EWKT and GeoJSON to SRID 900913 [duplicate]

Is posible transform data type EWKT with SRID 0 for example: MULTIPOLYGON(((295098.566494 6006717.0377012,344018.26458971 6009163.022606,329342.355161 5972473.2490342,295098.566494 6006717.0377012))) ...
0
votes
1answer
29 views

PostGIS- Geocode Milepost data

I have the same question as described in this,I have numerous milepost address (like Milepost 58.3 , US 30,NJ) Is there a way to do this in PostGIS?
0
votes
0answers
23 views

PostGIS - raster coodinates - no result for negative values of GPS

I have data in raster and try to run this query WITH ref As ( SELECT (ST_SetSRID(ST_Point(-20.12, 51.50), 4326)) AS pt ) SELECT ST_Value(raw_data, 1, ref.pt) AS val_0 FROM model_data The problem ...
2
votes
1answer
85 views

Connecting to PostGIS from MapInfo

I'm using MapInfo 15.2 64-bit and I am trying to connect a PostGIS database to display it in MapInfo. I am using PostgreSQL 9.5 with PostGIS 2.2.2. I have seen all kind of suggestions on different ...
2
votes
1answer
32 views

version of PostgreSQL/PostGIS supported by Embedded Cadcorp SIS 8.0

Can anyone tell me where I can find out what versions of PostgreSQL/PostGIS are supported by embedded Cadcorp 8.0 which I believe is based on Cadcorp SIS Map Modeller 8.0.
1
vote
1answer
83 views

Transform to SRID 900913

How i can transform the geometry WKB for example: ...
3
votes
2answers
189 views

Using geometry or point for postgis

I have a table with points that has lon/lat, i am adding postgis to my app. I am doing some tests and I found type POINT and type GEOMETRY. I want to convert my columns lon and lat to a point. For ...
0
votes
1answer
26 views

Error adding postgis layer in ArcMap 10.4

I imported some shapefiles to a postgis database. In QGIS it works fine, however in ArcMap not yet. I added postgreSQL as a database connection in ArcMap. I can also see the postgis layers in the ...
0
votes
0answers
25 views

Postgis load raster to DB running on AWS RDS with raster2pgsql

I want to perform very common task: I have Postgresql + Postgis running on Amazon Web Service cloud, using RDS service. I have there some vector layers and can execute SQL (Postgis) commands via ...
0
votes
1answer
43 views

Linestrings into one multilinestring

I have 2 tables "dijkstra_results_geo" and "dijkstra_results_geo_aggregate". I have a set of Linestrings in the column dijkstra_results_geo.geom_path_intermediaire (defined as geometry(Linestring, ...
2
votes
0answers
69 views

How to publish PostGIS Rasters in Geoserver?

How to publish PostGIS Rasters in Geoserver? gdalinfo landsat.tif Driver: GTiff/GeoTIFF Files: landsat.tif Size is 1773, 1428 Coordinate System is `' Origin = (177595.474744186009048,471385....
2
votes
1answer
98 views

PostGIS View, WFS-T and Geoserver

I'm using a PostGIS View as a layer to join multiple lookup tables. I published this view through Geoserver to edit using WFS-T. My first question is that this is right strategy using a VIEW as a ...
3
votes
1answer
74 views

How to use a polygon as a reverse cookie cutter on features in a Postgresql database

I want to be able to use a polygon in a database to remove all features and parts of features that falls within the polygon. Not as part of a query transferring the database to another database. I ...
1
vote
1answer
110 views

Postgres/PostGIS calculate area of Polygon in Square Miles

Polygon in Postgres/PostGIS database. It has the spatial reference 4269 which is in degrees. I know there is a ST_Area() to calculate it. this is my query to select the areas in the SRID units. ...
2
votes
0answers
36 views

Kernel Density with vector output and/or possible automation?

I'm currently working on a project that will have me calculate the kernel density of a number of shapefiles with varying parameters. My current workflow goes like this: Import shapefiles in QGIS 2....
1
vote
1answer
45 views

Postgres st_intersection points/polygon

I am trying to use the ST_Intersection function to intersect points by county and find the counts by county, but I am having no luck. SELECT counties.name, FROM counties INNER JOIN routes ON ...
1
vote
1answer
38 views

Postgres/postgis st_makepoint

I am looping through a csv, taking latlng values and trying to add there geometry to postgis enabled postgres table. xy values are int's conn = psycopg2.connect("connected") cur = conn.cursor() cur....
1
vote
1answer
68 views

Making selections from two tables based on the reference table in PostgreSQL/Postgis

Based on the address locations ad for the region of interest (as a reference), I am trying to make selections from two street layers street1 and street2. What I have tried is shown by the code below: ...
0
votes
1answer
81 views

Python to Postgres insert Geometry syntax

Having trouble creating geom columns and inserting geometry lat lng values into postgres table Is my syntax correct in creating the point geometry fields? st_makepoint is the point constructor. ...
1
vote
0answers
25 views

Missing vector features when import from .sqlite to postgis?

I imported vector data from a .sqlite file to PostGIS but not all of my vector features imported. I haven't been able to determine a reason for most of the loss of features between the databases (...
1
vote
2answers
47 views

Convert colum type in PostGiS via DB Manager/ SQL in QGIS

I have a csv file that I want to bring into a PostGIS database through DB Manager in QGIS. I have a column/ field called "Location" that contains geometry (e.g. (40.789423 -75.628493 232....
0
votes
0answers
22 views

Not able to edit PostGIS SDE featureclass in ArcGIS Standard

I have created an Enterprise geodatabase in PostgreSQL and now uploading OS MasterMap data using QGIS OS Translator Tool. The feature classes created are not editable, however if I create a blank ...
0
votes
1answer
30 views

lwgeom_to_geojson: 'PolyhedralSurface' geometry type not supported

I am using PostGIS (PostGIS 2.2.0 with SFCGAL extension) and I have data in postgres which is loaded using citygml2psql tool and it contains polyhedralSurface geometry. But when i run query : ...
3
votes
1answer
94 views

How to loop in PostGIS to add the next lat long to a route

I want to loop over the results of a query and then pass row(n)'s longitude, latitude and row(n+1)'s longitude and latitude to another function. I have a query which returns a set of coordinates from ...
2
votes
1answer
84 views

ST_Difference on linestrings and polygons slow and fails

I am trying to create a new table of linestrings with their existing attribution that are "different" to some polygons and am struggling to get a working PostGIS query. I have a table of linestrings (...
2
votes
2answers
53 views

PostGIS distance between multiple points

I have a data set in a PostGIS data base (table name is animals) with the following structure: id (int, pk) | latitude (double) | longitude (double) | type (char) | geom (srid: 4326) In the type-...
0
votes
2answers
33 views

Proper handling in PostgreSQL/PostGIS only after many queries?

I am trying to analyze GPS data of a parade on a fixed route with a certain variance due to the urban surrounding (canyoning). I'd like to project the GPS waypoints to the nearest points on the route ...
1
vote
0answers
18 views

How to query raster in PostGIS within GeoJSON mask only

I have a raster in PostGIS which I need to query pixel values from, but only within a specific area. So I have a GeoJSON polygon within which I want to extract min/max/avg values of the raster from. ...
1
vote
0answers
13 views

Single WMS pgRouting Layer from Array of Lat Longs

I am using the following loop for displaying the a bus route. 'stopLonLat' is a JavaScript object with all the latitude and longitude values of various bus stops. Since I am not looking for shortest ...
0
votes
0answers
30 views

Problem to input a .osm file in a Postgres database with Osmosis

I have a problem with import a *.osm file to postgres/postgis database. I hope someone can help me? Ich have done the following things. install Postgresql/Postgis and pgAdmin III -> works fine ...
3
votes
2answers
69 views

PostGIS - Get a point inside a line or polygon

I need to get the center point of a line or polygon to make marker for my app. So that when you click a marker the geometry appears (line or polygon). I used ST_Centroid to make it work. The result ...
3
votes
1answer
43 views

pgrouting: how to temporarily increase some edges' cost without affecting concurrent queries?

How to temporarily increase some edges' cost for one query without affecting other concurrent query? The case is, I would like to develop a system that allows users to query the shortest path of a ...
1
vote
1answer
25 views

Geometry column of new feature is not stored

var saveStrategy2 = new OpenLayers.Strategy.Save(); var vectorLayer = new OpenLayers.Layer.Vector("Vectors", { strategies : [new OpenLayers.Strategy.BBOX(), saveStrategy2], protocol : new ...
1
vote
0answers
88 views

importing shapefile in postgres

I am trying to import a shapefile to my database in postgres but there is no shapefile loader appearing in the plugin menu in PgAdmin. Postgis is definitely installed as I have added it as an ...