Tagged Questions

Version 2.0 of PostGIS brought a heavy set of new extensions for the PostgreSQL object-relational database, adding greater support for spatial objects.

learn more… | top users | synonyms

1
vote
0answers
292 views

How to import 3D geometries from DXF, VRML or X3D into PostGIS 2

we plan to develop a webbased 3D GIS using PostGIS 2 and GeoServer with a W3DS. The architecture works fine, but i have problems to import 3D geometries into PostGIS. The geometries come from AutoCAD ...
-1
votes
1answer
243 views

How to properly use PostGIS with Maps

First time using PostGIS in an app. Target: - Get Heat Map of customers from address table using leaflet.js and heatmap.js Have DB called store_dev. Installed OSM Bright from Mapbox in it. Have a ...
3
votes
0answers
183 views

PostGIS 2.0 st_geomfromgml using LineString fails with invalid GML representation

I am attempting to insert a geometry into a table using the st_geomfromgml function. The GML is being sourced from a Geoserver WFS request. The function call looks like this ...
2
votes
1answer
39 views

Weird behaviour of ST_Project with PostGIS2

somehow I can't understand the results of ST_Project, but maybe this problem is just me being stupid (again): Note: I use geography-type here, but the results are the same for geometry. I use a ...
3
votes
1answer
550 views

generate height data from DTED maps

I have 16 DTED maps of (1 degree x 1 degree). I have to generate combined height matrix of maximum 4 (1 degree x 1 degree) DTED maps in my C++ application. Can someone suggest to me which open source ...
1
vote
1answer
464 views

Dynamically load and display shapefiles from PostGIS 2.0 into Mapguide using .NET

I have a C# mechanism for Loading shapefiles into PostreSQL/PostGIS now I would like to dynamically load it on Mapguide fusion template.In either C# or VB.NET code behind. Use case is: 1.use uploads ...
2
votes
1answer
94 views

problems setting up postgis and importing data

Using Postgres 9.2.3.1 on a new Mac. I installed Postgres from the dmg file that I downloaded from the Postgres site. I then installed PostGIS using stackbuilder. This all worked flawlessly so far ...
1
vote
0answers
179 views

Renaming Columns in Geotools FeatureType

I am attempting to build a simple java program that loads shapefiles into a Postgis 2.0 database. Everything is working out great except that I would like to be able to modify the FeatureType in the ...
2
votes
1answer
329 views

How to Find the Nearest Node from a Given Coordinate

I have already developed a table manually. It contains the coordinates and the distance of all the nodes, there is no geom field or any field related to postgis. But I want to find out the nearest ...
3
votes
2answers
1k views

PostGIS - incorrect result distance between two points

I am quite confused the way PostGIS is returning the result for this basic query. So I am trying to find the distance between two points 45.2714,71.2087 and 42.3739,66.39 and the distance should be ...
3
votes
1answer
321 views

Using PostGIS for a large trajectory dataset

I have a spatial trajectory dataset which basically contains about 10E6 (lat,lon,time)-tuples, grouped together by an identifier so they form trajectories. Currently, SQLite is used to store the raw ...
0
votes
0answers
173 views

Create Polygon Overlay Handling Holes

How can I create a polygon overlay that correctly handles holes? This answer provides a method of creating a polygon overlay that does not handle holes. Can it be modified to correctly handle holes? ...
6
votes
2answers
1k views

PostGIS SQL query to find a polygon that intersects with a line

I need to build a PostGIS query that would select every polygon inside an area the river is flowing through. I'd better describe with an example below: There is a river (blue line) flowing through ...
0
votes
0answers
65 views

how to group interconnected edges inside a table?

Given a table and a random set of edges with source and target columns, how can I find out which edges connect with each other and then group them together using PostgreSQL?
1
vote
0answers
48 views

given sets of vehicle passing on each edge, how to get most used vehicle to avoid transition?

I have two tables: one, the resulting table from converting osm.xml via osm2po so I can use pgRouting, and another one that contains information on what edges each public vehicle passes through ...
4
votes
1answer
495 views

Transit Routing using pgrouting as core routing engine?

i'm a student and i'm working on a project. the aim is given two sets of coordinates(origin & destination) route through the map to determine the optimum path using public transportation and of ...
2
votes
1answer
636 views

How to visuilze PostGIS data in GeoJSON format with PHP

I need to visualize PostGIS Geometry column as an overlay of a Leaflet tiled Map. I started a question here ,but didn't get any simple and satisfied answer. So I am starting this question. I got an ...
0
votes
0answers
758 views

PostGIS data visualization

I have dump my data in PostGIS from shapefile successfully. I made a postgres connection through PHP and that also returning the data of other field. But the main problem is GEOM field visualization. ...
5
votes
1answer
504 views

How to snap line string start & end vertex to the nearest point?

I have a point layer and a line layer. The points are road junctions, collected using DGPS, while the lines are the connecting roads, collected through Handheld GPS in tracking mode. As a result, the ...
7
votes
2answers
470 views

How to get distance between one point and all other points in a table?

I have a table in Postgres with lat and long columns. Can I use the ST_Distance_Sphere or ST_Distance_Spheroid methods to get the distance between one point and all other points in the table? Do I ...
3
votes
2answers
285 views

How to clip from a point layer using postgis?

I've loaded a LIDAR xyz file into a PostGIS2.0 database and created a 3D point geometry column ("tblCLOUD") from the data. I've also loaded into the database a shapefile that contains six ...
2
votes
1answer
223 views

How to filter or query data in GRASS?

I have a PostGIS dataset with just over 2 million rows. Each row has a PostGIS geometry point value and several attributes. I'd like to do some analysis on certain subsets of the data, but I can't ...
0
votes
0answers
90 views

Can't drop table with geography column

I imported shp to postgis 2.0.1 with shp2pgsql and chose to use geography instead of geometry. However, now when I try to drop the table, the pgadmin/sql console/phpPgAdmin freezes. I can't neither ...
7
votes
1answer
547 views

How to set up GeoDjango with PostGIS 2.0?

I would like to run GeoDjango (Django 1.4) with Postgis 2.0. Whenever I try to run syncdb I get the following error for geographic fields: Failed to install index for stores.Store model: operator ...
1
vote
0answers
81 views

blank preview image for ImageMosaicJDBC (postgis raster) layer [duplicate]

In geoserver, while publishing ImageMosaicJDBC layer seems no problem, the preview of this layer does not give me an meaningful overview image, only a blank image with the correct lat lon extend. Also ...
1
vote
2answers
192 views

Is the PostGIS documentation correct for ST_Project?

In example of the page ST_Project the select is SELECT ST_AsText(ST_Project('POINT(0 0)'::geography, 100000, 45)); st_astext ------------------------------------------ ...
1
vote
2answers
1k views

How to find the nearest line from a point?

I have a table of Roads in PostGIS which geometry is "geometry(MultiLineString,4326)". Its attribute are gid osm_id name ref type oneway bridge maxspeed geom Now i want to know ...
0
votes
1answer
142 views

Open Source GIS Problem [closed]

I am new at open source GIS platform. I am using Ubuntu 12.10. I have tried to install the followings but without 2-3 tools I could not install anyone. Can any body help me how can I install the ...
3
votes
1answer
960 views

Postgres/Postgis doesn't work after update

I work on OpenSUSE 12.1 and after today's upgrade (2012 NOV 14) Postgres and Postgis doesn't work. If I login to Postgres server by PgAdmin, get the message: translated from polish "ERROR: can't acces ...
2
votes
1answer
741 views

How to fix 'GEOSDifference: TopologyException'?

Why does Postgis throws an error in this SQL? Error: ERROR: GEOSDifference: TopologyException: found non-noded intersection between LINESTRING (-5.67027 43.5374, -5.67085 43.5376) and LINESTRING ...
2
votes
1answer
187 views

Problems with QGIS (v 1.8.0) layer labels [closed]

I have a PostGIS (v 2.0) layer representing lakes. The attributes "chinchar" and "chintrans" contain Chinese characters and Pinyin (Roman) characters in UTF8 format. When I use Layer -> Labeling in ...
2
votes
1answer
403 views

Querying PostGIS Raster with MultiPoint

For one of my projects using PostGIS 2 I have a table with GPS tracks (igc_files). It holds records including a MULTIPOINT() column that has about 1,000 points for each record and a column that has an ...
3
votes
1answer
433 views

nearest neighbor within table using PostGIS

using PostGIS 2.0 and PostgreSQL 9.1 I have a table of photographic observations, sco_photos. The location column contains a PostGIS geometry point specifying where the observation was made. The table ...
2
votes
2answers
607 views

What's the fastest way to search for polygons that intersect with others?

I'm querying the database for searching polygons that intersect with others, but is very slow research, wanted to increase the speed. I thought of using sphinx, solr, elastic search googled but did ...
14
votes
1answer
1k views

How to publish PostGIS Rasters in Geoserver?

What is the best solution to publish postgis rasters using Geoserver? I have spent a lot of time trying to create a Raster datasource using Image Mosaic JDBC but with no luck. Steps performed: 1. ...
16
votes
1answer
182 views

Can we create views over a raster table in Postgis2.0?

Is it possible to create PostgreSQL views over a table that contains raster data? I have succeeded in creating the view but the entry in raster_columns is not correct (all the raster info is ...
2
votes
1answer
51 views

How do I append PostGIS commands to the system path?

I'd like to be able to call psql instead of having to put in the full path everytime. I went into Environment Variables through My Computer and added the path to the semi-colon separated list, but ...
0
votes
1answer
234 views

What is the fastest way to identify the two nearest linestrings using PostGIS?

I want to be able to identify the closest roads to two points that are generated through geocoding (a start and end address). The points will likely be near a linestring. Two approaches that I have ...
5
votes
1answer
3k views

Postgis 2.0 - public.geometry_columns view does not contain correct info for views

We have recently updated our database to Postgis 2.0. In our system we used to create views for tables containing a geometry column. After creating the view we also manually updated the ...
2
votes
1answer
935 views

How to find polygons inside polygon with PostGIS 2.0

I have a relation representing all the counties in my country and the other one containing all the districts - e. g. each and every county is composed of several districts. How do I select them with ...
4
votes
1answer
213 views

Update PostGIS after updating GDAL?

I am using PostGIS 2.0 and I want to use the raster functionality through mapserver. It seems as if the latest official GDAL release 1.9.1 has an unstable PostGIS raster driver, as pointed out in a ...
0
votes
1answer
198 views

PostGIS raster support

I have the following requirements to manage raster data 1) Convert raster-maps from BSB format to PNG or GeoTIFF 2) Cut the borders of the map 3) Merge individual maps to form a contiguous coverage ...
2
votes
1answer
746 views

Access PostGIS Raster layer through mapserver

I am trying to use a cgi script calling mapserver to display a raster layer that is stored in a PostGIS database. However, only a blank white image is returned and I don't know where the problem is. ...
6
votes
5answers
2k views

How to split OSM roads into individual segments at intersections?

I want to create a road-network for use with pgRouting using OpenStreetMap data. I loaded a shapefile from GeoFabrik into a Postgres table (with PostGIS enabled). However, one problem I had was that ...
8
votes
1answer
489 views

Are Zonal Statistics possible in PostGIS2?

Now with postgis2 which supports rasters by default is it possible to do a zonal statistics analysis? I've google it but I haven't found anything solid? Is there a tutorial outthere to get me ...
2
votes
3answers
2k views

How to import data with SRID 4269 to GEOGRAPHY type?

In PostGIS, we are importing various US census bureau shapefiles (with SRID = 4269) using shp2pgsql loader. I have medium-sized database with several tables containing fields of type geography ...
6
votes
3answers
2k views

Loading geotiffs into PostGIS using raster2pgsql

I have an issue with loading some Ordnance Survey raster data into PostGIS. I have been using the following raster2pgsql command to load a tif that I have placed in my C:\Program ...
1
vote
2answers
138 views

st_intersection; What Im doing wrong?

Im trying to run this query : create TABLE data.agri_grc as select id, code_00, ST_Intersection(data.agri.geom,data.grc_bor.geom) as geom from data.agri; But im getting this error: ERROR: missing ...
0
votes
1answer
2k views

How to export data from QGIS to display in Google Maps?

I'm exporting layers of a project for a quantum gis postgis table and visualizing the data in gmaps, but the coordinates are very wrong. is there any special way to export the quantum gis? postgres ...
2
votes
0answers
4k views

Create a stacked bar chart with matplotlib [closed]

I'm trying to create a stacked bar chart in python with matplotlib and I can draw my bar one up the other # -*- coding: utf-8 -*- import psycopg2 import matplotlib.pyplot as plt import numpy as np # ...