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

learn more… | top users | synonyms

1
vote
0answers
11 views

PostGIS raster2pgsql problem

I ran into this problem in PostGIS: raster2pgsql -c -I -C -s 4326 -N -9999 -M -Y -F ./test2/*.tif rdem2 > rdem2.sql Processing 84/84: ./test2/dem2_4326_06_14.tif ERROR: ...
0
votes
0answers
19 views

Select points near polygon in Postgis

I'm trying to make a spatial query, but I think something is wrong with it: I have two tables, places (point) and cities (polygon) When I try to get the points within 500m to one point, there is no ...
1
vote
3answers
103 views

How to get extent of multiple geometries?

I can query a geometry extent like this: select ST_Extent(geom) from tableName; But sometimes I am querying geometries more than one. I am getting 5 points that different locations. So I wanto to ...
1
vote
1answer
24 views

I can't understand this ewkb type mask

I have the following ewkb strings from PostGIS: 01 01000020 E6100000 AECB9307F9D81240 0F2ADCE003704940 01 01000020 E6100000 7EAA0A0DC4920DC0 5AF0A2AF201F4440 I've been able to understand every data ...
0
votes
0answers
26 views

Find hotspot with highest density for two objects

I'm using PostgreSQL/PostGIS and I have an advanced type of query. My database contains two types of objects - let's say homes and crime. Is there a way that I can find the area with the densest ...
2
votes
0answers
27 views

How to create raster from table containing cell values in PostGIS?

I am having a table with integer values. These values are in between 0 and 2. I want to create a raster out of that table with integers as cell values. Or else how to create polygons out of that table ...
1
vote
0answers
16 views

QGIS Add PostGIS layer: restricting to single schema?

My primary PostGIS database has 12 schemas (schemae? TNIRN...), some of which have nasty-sized tables. The DB is on localhost, on my own machine. For the most part, the actual working tables are in ...
1
vote
1answer
21 views

POSTGIS query - extracting common point from polygon data

I have a polygon dataset and need to find the single common point where 3 polygons meet. I'm approaching this by creating duplicate tables and comparing them to the main one (polygon_table a). I've ...
1
vote
0answers
24 views

PostGIS Geography data type not displaying in QGIS

I am trying to display data held in the PostGIS Geography type on a map in QGIS. Whatever I do I can't get it to work. Here is the SQL that creates my data - a single point in London. CREATE TABLE ...
1
vote
0answers
50 views

How can I speed up a slow ArcGIS Server 10.2 - PostgreSQL (9.2) ST_Intersects query?

I am troubleshooting a slow st_geometry query in Postgres 9.2 that uses ST_Intersects--a basic Select from table where ST_Intersects type query. table_extent ...
1
vote
1answer
40 views

Postgis ST_Distance query returning inaccurate results

I am using the following query to retrieve records from a postgresql DB @services = Service.select("*, ST_Distance(services.lon_lat, ST_GeomFromText('POINT (lat lon)', 4326)) as ...
1
vote
0answers
36 views

GeoDjango: AttributeError: function 'GDALAllRegister' not found [on hold]

Im trying to get started with GeoDjango. I am using this https://docs.djangoproject.com/en/1.8/ref/contrib/gis/tutorial/ tutorial. When I run "python manage.py migrate" This error occur: ...
0
votes
0answers
13 views

pgsql2shp query error select

I need to export from postgis some data obtaining the center of my polygons, now I'm working on Ubuntu. My command looks like this: ./pgsql2shp -f /home/me/ESTADOS_POINT -h localhost -p 5432 -P ...
1
vote
0answers
21 views

Mapnik performance - large polyline dataset

I'm working with a very large set of polylines - contour data - to be rendered with Mapnik. (The contours are generated using gdal_contour from SRTM data.) At present I'm storing them in PostGIS and ...
0
votes
2answers
21 views

SRID is messed up when google-maps layer is added

I've some problems with using a PostGIS layer within QGIS. First of all, I had this same problem on both QGIS 2.4.0 and 2.6.1 I cannot display the Google Maps layer AND my PostGIS layer together. ...
1
vote
1answer
67 views

Store a GeoJSON FeatureCollection to postgres with postgis

I am new to GeoJSON. I have a GeoJSON features collection as shown and would like to store it in postgres table (testtable). My postgres table has a serial id and geometry column. { "type": ...
3
votes
1answer
37 views

ST_MakeLine within CartoDB.js

I'm building an interactive map using CartoDB.js in an HTML page. I have the user input an address that gets geocoded. I then use the user's lat/lon coordinates to perform SQL queries on CartoDB. The ...
0
votes
2answers
34 views

Problem with a PostGIS trigger

I'm trying to update a lat and lon columns each time I insert a point with a trigger, but I don't know why I get an error. This is the syntax I'm writing: CREATE OR REPLACE FUNCTION update_tg2() ...
0
votes
1answer
36 views

pgrouting pgr_dijkstra forcing route along a selected edge?

I have routing working where a user clicks 2 points on the map, I find the closest vertex to those 2 clicked locations and pass that to a pgr_dijkstra function. What I would like is give the edge a ...
1
vote
1answer
42 views

Calculating Distances Between Geometry Columns of Differing SRIDs

I am attempting a relatively simple task but have been running into trouble. I have two tables, one which has lat and lon points which were geocoded using google (SRID 3857) and another table which ...
1
vote
0answers
12 views

Geoserver - How to make a psql-backed timestamp that uses timezones

I'm working on an application that extends geoserver and am frustrated as I'm trying to define a SimpleFeature that has timestamps that include timezones. I've tried declaring my timestamp field ...
0
votes
1answer
33 views

Plotting Street Map for City - Where do I start?

Please excuse my ignorance of this and if I break any of the rules please be gentle as this is my first post here and I'm not GIS expert either. I need people to steer me in right direction so that I ...
2
votes
0answers
21 views

Not able to get the PostGIS Layer Viewer running in pgAdmin or command line

I've installed PostGIS Layer Viewer as a plugin for pgAdmin. I've downloaded postgis_viewer.py from the official repository on GitHub! and followed the install instructions described on Web site!. ...
1
vote
0answers
29 views

I am getting error in PostGIS 'function st_clip(raster, integer, geometry) does not exist'? [closed]

I have to find the count of the number of pixels in a given band of a clipped raster. For clipping, I am using ST_clip(). Through clip function raster is clipped with a polygon. I am getting ...
1
vote
1answer
39 views

error importing shp into postgis using ogr2ogr

I run an automated script that copies a number shapefiles into PostGIS. I have a problem with one dataset which fails during the export. As the roads.shp dataset is maintained by someone else, I ...
1
vote
1answer
39 views

How to get pixel values/cell values for stored raster files in postgis?

Raster files in tiff format are storing into database.However I gets only an attribute table. Is there any way to retrieve pixel values/cell values in the table. I have used raster2pgsql command for ...
1
vote
1answer
80 views

Why doesn't my spatial index work?

I have a table with 50 million test points. The points are stored as latitude / longitude with SRID = 4326. The create script for the table: CREATE TABLE points ( name character varying, point ...
1
vote
1answer
32 views

Geoserver GeoWebCache caches tiles of incomplete layers

I have data in a PostGIS database that is being pulled into Geoserver using a PostGIS (JNDI) store. The dataset I am using is a continuous polygon grid, but the dataset itself isn't all that large. ...
1
vote
0answers
23 views

PostGIS is not seeing any GDAL drivers

I've tried setting POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL as an environment variable. As well as running SET postgis.gdal_enabled_drivers = 'ENABLE_ALL'; from psql. (With a pg_ctl restart after each) ...
4
votes
1answer
62 views

PostGIS: Strategy for fastest select by BBox with an ORDER BY polygon area clause. Cluster?

Update 2 (below) suggests 14% of the table geometries are stored out-of-line with the rest of the table records. This may be a useful clue. The Problem: We've got a table with appx 170,000 WGS84 ...
0
votes
1answer
40 views

find all circles intersecting another in a table [duplicate]

I am using postGreSQL (9.3) and postGIS (2.1). I have a table containing names and circles (point + radius). Given a name and a circle (point + radius), I would like to find all the database lines ...
0
votes
1answer
18 views

Preserving styles when going from KML to WMS

I'm currently losing styling information somewhere along my chain of applications: KML -> ArcGIS Layer (via ArcGIS Desktop) ArcGIS .gdb -> PostGIS via ogr2ogr PostGIS -> GeoServer GeoServer ...
0
votes
0answers
8 views

Extract table-embedded attributes in KML using ogr2ogr

I'm loading a number of diverse data files into a PostGIS database, using ogr2ogr. One of these data files is a KML with useful attributes embedded as an HTML table in a description column: ...
4
votes
2answers
147 views

PostGIS: ST_Equals false when ST_Intersection=100% of geometry?

I have 2 datasets consisting of cadastral parcel data - roughly 125,000 rows each. The geometry column is WKB polygons representing parcel boundaries; all data are geometrically valid (the polygons ...
0
votes
1answer
36 views

Exporting layers from ArcGIS into PostGIS while preserving attributes such as color

I have managed to import/convert a KML into ArcGIS 10.0 (ArcMap) using the built-in conversion tools and now have a series of layers. Next, I export these layers to a PostGIS database using the ...
2
votes
2answers
60 views

Find the area of points in PostGIS?

I have points that form a line. I would like to assign a radius to each point to give them volume, e.g. 50m and then find the area of the combined points. Does anyone know of a way to do this in ...
0
votes
1answer
30 views

Calculate area of a raster for an irregular polygon in PostGIS

I have a number of polygons with irregular shapes (i.e. non-rectangular) and want to calculate their areas after I have converted them to rasters. Here are my steps: Convert my geometry to a ...
0
votes
0answers
44 views

Implement Leaflet search box for 370,000 points stored in PostGIS served as raster tiles

I have built http://opentrees.org. It's a TileMill/PostGIS/Leaflet stack with raster tiles and UTFGrid interactivity. I'd like to add a search box, so users can search for a feature – trees in this ...
0
votes
1answer
36 views

Creating point using ST_GeomFromText with SQL parameters?

I'm trying to insert points using C# into a PostGIS / PostgreSQL database. I'm using the Npgsql driver. I suspect this is less a driver issue and more a syntax issue due to me being unfamiliar with ...
0
votes
0answers
29 views

ST_MakePoint returns an error when using Python

I am trying to use ST_Point or ST_MakePoint to create points from a table of latitude and longitudes coordinates. However I am consistently getting an error even when trying the examples. For example ...
0
votes
2answers
41 views

How to make interactive OpenStreetMap layers in TileMill?

If I'm reading the UTFGrid spec right, you can only have 65,501 different interactive features. Or more precisely, every feature needs a unique ID in the range 0-65501. TileMill uses UTFGrid for its ...
0
votes
0answers
27 views

GeoDjango: Find all points within radius?

I am working in GeoDjango (with a Django 1.7 and PostGIS 2.1.4 backend). I have a model with a PointField in my database and I am trying to find all items within 10km radius of a point. Here is my ...
0
votes
0answers
47 views

Create a route by using points (pgRouting)

I'm currently working on a routing model for 17th and 18th century voyages. These routes are based on data from old shipping logbooks. I made a separate layer in QGIS which contains point. I exported ...
1
vote
1answer
35 views

Create a raster with fixed 10meter pixel scale in PostGIS

I have a series of points that I would like to convert to a raster, and then calculate the area of the raster as a proxy for "amount of area covered". I'm trying to do this using PostGIS rather than ...
0
votes
2answers
25 views

how to configuring geomajas wih oracle spatial db?

I have just done intial setup of the geomajas project and trying to config its data source with oracle database. I am following the given example for sqlserver and POSTGIS. My oracle layerroad xml ...
1
vote
0answers
39 views

Is geotools transformation of EPSG:3785 (Web mercator) to EPSG:4326 wrong?

Using postgres (9.3.6) and postgis: select st_astext(st_transform(ST_GeomFromEWKT('SRID=3785;POINT( 7550310.77 4139679.02 )'), 4326)); This returns POINT(67.8255956454323 34.8217133646348) Using ...
0
votes
1answer
23 views

Problem with ST_Intersection in postgis

I have got a problem with ST_Intersection as bellow query. I do not know why I can not get element z of this intersection? ----query: SELECT ST_AsText(ST_Intersection('LINESTRING Z (0 0 0, 2 2 2)', ...
3
votes
1answer
94 views

How to edit a PostGIS database using ArcGIS for Desktop Add-In/Extension? (no ArcSDE)

I need to improve an existing solution to be able to do multiuser editing within a PostGIS database from ArcMap. Available for the solution is ArcGIS for Desktop 10.3 [Basic]. (No non-free Extensions ...
1
vote
0answers
33 views

Calculate surface map from PostGIS

We need to create surface maps from the website. The data is stored on PostGIS (2.1) as a table of Point geometries with a field indicating a thematic value. The optimal solution would be to produce ...
1
vote
1answer
23 views

Extracting specific geometry point from MultiPoint geometry using PostGIS?

I am working with multipoint geometries in postgis and would like to extract the geometry point associated with the greatest y value of the multipoint geometry. How may I accomplish such a task? For ...