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

learn more… | top users | synonyms

0
votes
0answers
21 views

line_locate_point: 1st arg isnt a line

i used this query for routing procedure SELECT pgr_nodeNetwork('edges', .006); I am following this workshop http://workshops.boundlessgeo.com/tutorial-routing/ and this is the error, I can't ...
0
votes
0answers
12 views

Getting ST_AsGDALRaster to recognize pixel type

I have several PostGIS raster bands in 32BF format. I am following the instructions here to access the band in Python as a numpy array. But it only works if I reclass to 64BF. This is my original ...
0
votes
0answers
16 views

ST_SetValues - int array

I am using ST_SetValues with array defined as ARRAY[[9, 9], [9, 9]]::double precision[][]. If I store 32bit int value in this array (like eg 65546) can I retrieve this value exactly? Or is there ...
0
votes
0answers
37 views

Creating a table and inserting selected streets using plpgsql functions

I am trying to select all streets within 50 meters distance from each address location and store them in a separate table using Postgresql (plpgsql) functions. So far, I have written the following two ...
0
votes
0answers
17 views

ST_AsRaster ST_AsTiff

Can someone give me an example how to use AsRaster and ST_AsTiff together? I am having trouble to create a tiff image. SELECT ST_AsTiff(ST_AsRaster(ST_Buffer(ST_GeomFromText('POLYGON((-30 40, -20 30,...
0
votes
0answers
15 views

How to get marker's coordinates from GoogleMap into ModelForm (GeoDjango)

models.py: class Location(models.Model): name = models.CharField(max_length=100, verbose_name=u"Локация", default=u'') coords = gis_models.PointField(u"долгота/широта", srid=4326, blank=True, ...
0
votes
0answers
40 views

Creating curved lines between two points in QGIS

I am trying to create curved lines between two point in QGIS. There are a few posts that show how to create these lines (hyperlinks below). However, I am having trouble executing the code in QGIS. ...
0
votes
0answers
43 views

Counting nodata and data pixels using PostGIS

I'm using PostgreSQL 9.2.4 and PostGIS 2.0.3. I have some raster layer and I'm trying to get the count of all pixels (including nodata), cliped by polygon. Raster was imported by raster2sql: ...
0
votes
0answers
31 views

Postgis Database: How can I get all gps points between specified timestamps and specified region?

I am totally new to DBMS. I have traces of vehicles in different csv files for each user. Format: name,timestamp,latitude,longitude. 1) How to implement RANGE Query which asks for all the gps points ...
0
votes
0answers
20 views

Inserting markers coordinates into postgis table with one row per marker via php

I have a leaflet map with some markers (coming from a .gpx) and I’m trying to send them in a postgis table with one row per marker. For the moment it works but only for the first marker. Here is how ...
0
votes
0answers
20 views

Database modeling for big data (big set of points X big sets of possible values for each points)?

I'm building a PostgreSQL database with the intent to host modelisation results for different projects. Each project has a set of receptors points (~5000-10000 receptors) and have many results sets (...
0
votes
0answers
11 views

Alignment in ST_Intersection with PostGIS raster

Trying to intersect two rasters, but they don't have the same scale. I have to do everything in one query. The query below gets the following error: The two rasters provided do not have the same ...
0
votes
0answers
49 views

Is it possible to use pgsql2shp utility in PL/pgsql environment?

I intend to use PL/pgSQL to generate calculation points on streets with respect to address locations. I am aware that using pgsql2shp utility, a shapefile can be generate using postgis query. I was ...
0
votes
0answers
44 views

ST_Distance between ST_Centroid and ST_Y

I'm trying to make a ST_Distance between a ST_Centroid and a ST_Y... But ST_Centroid is a geometry and ST_Y is a float. How can I make this? My query: SELECT ST_Distance(ST_Centroid(ST_Collect(...
0
votes
0answers
27 views

Look Up table from (Latitude,Longitude) to country, city etc. boundaries (Bounding Box)

I'm looking for "Standard" assume file (?) containing best practice used simple "approximately squared" boundaries of countries, major cities etc. The use case is getting (Lat,Lon) and perform look ...
0
votes
0answers
27 views

run shp2pgsql command in c# application

I worked for a month on this command but in vain ; really if someone already tried to help me find the error , because when I load the application displays the message to me as the shapefile was ...
0
votes
0answers
37 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
0answers
33 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 ...
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 ...
0
votes
0answers
22 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
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
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 ...
0
votes
0answers
25 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 ...
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 ...
0
votes
0answers
40 views

SRID and lat long values

I am using the following query to generate the lat long values SELECT NAME, ST_X(ST_Centroid(ST_Transform(geom, 4326))) as longitude, ST_Y(ST_Centroid(ST_Transform(geom, 4326)))as latitude from ...
0
votes
0answers
38 views

Converting polylines coordinates stored in PostGIS in column type text, in another column type geometry(MultiLineString,2154)?

I want to draw a polyline on a leaflet map and then send it to PostGis with php. I’m drawing my polylines using the Leaflet draw plugin and send the coordinates in a column “coords” in PostGIS with ...
0
votes
0answers
34 views

How to replace a part of OSM data in postgres?

i want to replace the apart of osm data in postgrs database. for example ,replace the osm data of china which in planet osm data. i hava used osm2pgsql, but if use osm2pgsql import the china data ,...
0
votes
0answers
20 views

Error on ST_UNION: SSL SYSCALL error: EOF detected

I'm using Postgres 9.4 and PostGIS 2.1. I have a table that looks like this: wkb_geometry | geometry(Polygon,4326) | id | integer | county | character varying | ...
0
votes
0answers
25 views

Can you merge GeoJSONs in PostGIS?

I'm not too familiar with the GeoJSON functionality in PostGIS. In essence - I'm having problems with the computation of ST_AsGeoJSON(ST_Union(g)) taking too long for large g. Is it possible to ...
0
votes
0answers
40 views

Handling empty PostGIS geometries with GeoServers Pregeneralized Features extension

I've setup my GeoServer instance (2.8.2) with the Pregeneralized Features extension to serve several large polygon layers from PostGIS (9.3), and while it is working I am still experiencing remarkably ...
0
votes
0answers
17 views

multigtfs and pgr_createTopology

Could anyone know how to create a Topology on imported GTFS data into PostGIS with multigtfs? In fact, pgr_createTopology needs the edge_table or network table. Here are tables obtained after the ...
0
votes
0answers
34 views

How cut multilinestring by 2 points on postgis?

I know how cut linestring by 2 points, easy: ST_LineLocatePoint,ST_LineSubstring. But i have unmerged multilinestring, few lines are not connect?
0
votes
0answers
36 views

Are there any addresses that straddle two or more congressional districts?

I'm using a shapefile of TIGER data provided by the Census Bureau for locating an individual's congressional district. In PostGIS I'm running an ST_Intersects query in order to take a (lat, long) ...
0
votes
0answers
55 views

How can I add the PostGIS extension?

I'm experiencing difficulties when trying to add the PostGIS extension to PostgreSQL. I wasn't able to add the extension during the installation because of an error. Now I'm trying to add the ...
0
votes
0answers
59 views

Union geometries from multiple tables

I need to create a "total" polygon by merging together all the geometries from about 10+ tables into one big polygon. For a test with just 2 tables I tried ST_UNION and ST_COLLECT, the result was 500,...
0
votes
0answers
25 views

Using the raster function ST_Clip?

I am using Postgis Raster in POSTGIS 2.1.5 on PostgreSQL 9.4.5 on Ubuntu 15.04 32-bit system. I using ST_Clip to clip a huge number of GeoTiff Files by the geometry field of another POSTGIS table. In ...
0
votes
0answers
52 views

Retrieving postgis image to nodejs?

I am trying to retrieve a PostGIS image generated with ST_AsPNG to nodejs-pg-promise then put it to respond. I have achieved the PostGIS side, but have failed on putting the resulting image to ...
0
votes
0answers
28 views

Using pgsql2shp in server code with PostGIS installed on Amazon RDS instance

I've created a web application using the Meteor web framework, GeoServer and PostGIS. I've deployed my app on Amazon Web Services with the Meteor app and GeoServer running as 2 separate tasks on 1 EC2 ...
0
votes
0answers
37 views

ogr2ogr - PostGIS to GML with nested attributes

I am attempting to create GML from PostGIS tables and having issues with nested tags. Before I waste too much time on this, I would like to know if what I am trying to do is possible with "ogr2ogr". I ...
0
votes
0answers
26 views

Geoserver Training Material Error - Installing WPS and wms-eo plugin

I have installed Geoserver training package from geo-solutions. Following this link - Tutorial from geo solutions Works perfectly. Though when I am trying to add Web Processing Service (WPS) ...
0
votes
0answers
38 views

Calling cmd command from stored procedure in PostGIS

How to execute the command prompt from stored procedures in PostgreSQL. Below is cmd command to convert PostGIS data to image: PG:"host='<host>' port:'<port>' dbname='<dbname>' ...
0
votes
0answers
70 views

Converting PostGIS data to an image

I have an image showing the height information of a map. I have created a table using the 'raster2pgsql' command. This table stores the height values of the map. Now I want to create an image out of ...
0
votes
0answers
33 views

PostGIS: Merge features based on column value

I have a table planet_osm_roads. The table has one column ref that indicates the code of the road. Let's say that I have a road coded 'AA1' which is represented by 5 segments (or rows in the ...
0
votes
0answers
55 views

How to deal with different projections in PostGIS spatial analysis?

I am doing something wrong, but try as I may, I can never seem to grasp all aspects of how to project layers in GIS. I am working with two files: 1) The USGS maintains a list of locations with ...
0
votes
0answers
151 views

GeoDjango: Insert geography coordinates and filter the nearest points, step by step

I would like to: Save pairs of srid 4326 (latitude, longitude) points in a PostGIS Geodjango 1.8 Database. (Maximum distance between the edge points: 2.000km) Given a srid 4326 (latitude, longitude) ...
0
votes
0answers
42 views

SQL script for postgis column name with colon

I have an sql script that creates some tables from the default planet_osm_point, planet_osm_line, planet_osm_polygon tables which are created with the osm2pgsql command line tool. DROP TABLE IF ...
0
votes
0answers
42 views

Moving a marker along a WFS road layer

I have WMS base layer and a WFS road layer published from PostGIS database using GeosServer and Openlayers. The two layers are displaying fine on the map. How can I move a marker along the road like ...
0
votes
0answers
16 views

PostGIS Tilemill subquery

I need to find a way to merge ways into one long lines with the same attributes. I heard I can use st_union but I don't know how. I have a postgresql data base connect with tilemill. It works fine but ...
0
votes
0answers
21 views

Insufficient permissions: The project file not is writable?, QGIS

I have QGIS-server running, with PostGIS-layers in my project. When making changes I can´t save them. The above log comes up? How come? Normally it works fine.
0
votes
0answers
64 views

How to correct this error Caused by: java.lang.ArithmeticException: / by zero in geoserver

My environment is: geoserver 2.8.1 image mosaic JDBC java 1.7.0_79 centos 6.7 postgresql 9.4.5 postgis 2.1.8 I used ImageMosaicJDBC to publish my tiff image in geoserver. But, I get the error ...