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

learn more… | top users | synonyms

2
votes
1answer
60 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
29 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
69 views

Transform to SRID 900913

How i can transform the geometry WKB for example: ...
3
votes
2answers
135 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
20 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
40 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, ...
1
vote
0answers
60 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
87 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
59 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
80 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
28 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
43 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
32 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
58 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
24 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
42 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
85 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
69 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
47 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
17 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
26 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
63 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
42 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
23 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
62 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 ...
2
votes
2answers
62 views

postgis table - shapefile - mapinfo file [closed]

I have a .tab file with a ridiculous amount of columns (96). One of my colleagues at my new job wanted to update them manually one by one. I told him I could do that in an easier way using PostGIS. So ...
1
vote
1answer
23 views

How to style feature in mapserver mapfile based on values from database?

We have a table "Shapes" in PostGIS that consists of (among other things) a geometry column (the_geom) and an ID column (type_id) which is a foreign key to another table called "ShapeTypes". A given ...
0
votes
3answers
89 views

How can i use WFS in Openlayers 3 with mapserver and PostGis?

I didn't find a documentation to display features ( vectors ) combining MapServer ( mapfile ) and PostgreSQL/PostGIS and OpenLayers 3 ?
1
vote
0answers
30 views

How to get all pixel values of raster within a GeoJSON FeatureCollection in PostGIS

I need to extract all pixel values in a raster within a GeoJSON mask, using ST_Intersects. Attempt (throws invalid GeoJson representation): select row_to_json(t) from (select * from table_name where ...
3
votes
1answer
53 views

GIST slows down query?

I have an odd case where creating a GIST index slows down my query instead of speeding it up. The setup consists of two tables, one with multi-polygons, another with points. I want to calculate which ...
0
votes
0answers
24 views

Problem with projection in pgRouting layer in GeoServer

I followed this tutorial for creating a pgRouting layer in GeoServer. When I try to publish this layer Native Bounding Box and Lat/Lon Bounding Box are not getting generated correctly. For my road ...
1
vote
0answers
21 views

Modifying PostGIS database using geoserver

I want to build a mobile app using GeoServer and PostGIS database and I am little confused about how user will interact with database. I want end users to be able to upload new geospatial data to the ...
0
votes
1answer
22 views

ST_Length(ST_ShortestLine()) equals 0, but ST_Disjoint = True

Recently, I encountered a very strange phenomenon. I have to split a multilinestring on the point of touching another line, sounds complicated but it is just preprocessing to build a graph. Now the ...
1
vote
0answers
35 views

Generate more nodes for routing

The following picture shows my routing database all set for querying loaded to QGIS. Red line is the road I want to select route from, yellow points are the vertices generated after running ...
1
vote
0answers
26 views

QGIS - Split a line having attributes with UNIQUE constraint

I am using QGIS with a PostgreSQL/PostGIS database, where the lines table (named 'segments'), besides the integer serial primary key, has a UUID column having a UNIQUE constraint. Trying to split a ...
0
votes
1answer
220 views

PostGIS broken after Ubuntu 16.04 upgrade

I upgraded Ubuntu from 15.01 to 16.04 and PostGIS is broken. Below are the errors: psql (9.5.2) Type "help" for help. osm=# select version(); version ------...
2
votes
0answers
14 views

ST_ColorMap wrongly loses 0.0 value when INTERPOLATE

I want apply a colormap to a monoband grey scale tiff from postgis calling ST_ColorMap. My query is something like "SELECT oid, lowrite(lo_open(oid, 131072), tiff) As num_bytes " + "FROM ( ...
1
vote
1answer
44 views

How to convert a PostGIS geometry stored as text back into a geometry?

I have a geometry column stored as text e.g.: '010100002091080000000000804D624041000000C066735741' in PostgreSQL db with PostGIS. This for a point geometry with the EPSG:2193. How do I convert ...
1
vote
1answer
48 views

How can rewrite this query for using with commonly used lat-long values

I have this query to get the nearest road vertices from a bus stop point. Ho can a re-write this query to pass commonly used lat-long values like in google maps instead of 715127 957625 SELECT * ...
3
votes
1answer
95 views

PostGIS - Linestring doesn't contain a Point - Problem

I have a problem to check if a Linestring contains a Point. I consider the straight line y = 0.1 x , and take by it a segment l='Linestring( 0 0 , 4 0.4 )' and a Point p on segment l, p = 'Point(1.5 ...
1
vote
1answer
39 views

Get points from polygons with extreme angles

I intend to remove points from a polygons with extreme angles like the image link Get the points Remove from linestring I make my buffer like this... SELECT (ST_Dump(ST_Union(ST_BUFFER(the_geom,...
0
votes
1answer
18 views

I have two points in my geodjango models when serializing them using drf gis one of them gets renamed and the renamed one doesn't show in haystack?

class Space(TimeStampedModel): origin = models.PointField() destination = models.PointField() origin_address = models.CharField(max_length=255) destination_adress = models.CharField(...
4
votes
1answer
64 views

Why QGIS WFS doesn't update PostGIS line and polygon layers?

I installed PostgreSQL and PostGIS and created PostGIS layers in GeoServer. But when i want to change geometry in QGIS via WFS it drops an error: ": Error performing insert: java.lang.String cannot ...
0
votes
0answers
43 views

Generating a route from an array of lat-long values in OpenLayers 3

I have developed a web application for bus tracking using GPS devices fitted on them. I am using MySQL to store and retrieve the lat-long values coming from the device. Also I have the route names and ...