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

learn more… | top users | synonyms

0
votes
1answer
184 views

Postgresql on Ubuntu Server and QGIS [closed]

Complete newbie... I taught myself the basics of GIS on the job with ArcGIS 9.3. I have been plating with QGIS and have gotten the basics down on both. I am not well versed in the terminology related ...
1
vote
2answers
535 views

Function for Selecting Points in a Polygon

I've been banging on this for a few hours, but since I'm relatively new to PostgreSQL and PostGIS, I can't find the solution. I'm trying to create a stored procedure (function) which will return all ...
4
votes
1answer
536 views

How to import ECW into my postgis database with raster2pgsql (windows)

I'm working on windows 7 64 bits, postgis 2.01. I have to import ECW files into my postgis database. Unfortunatly, my postgis seems to has been compiled without gdal ecw support.When i do a ...
4
votes
1answer
146 views

QGIS field calculator and Postgres permissions

I’ve given user x the following GRANT ALL ON ALL TABLES IN SCHEMA y TO x; GRANT ALL ON ALL SEQUENCES IN SCHEMA y TO x; GRANT ALL ON ALL FUNCTIONS IN SCHEMA y TO x; However in QGIS they dont have ...
5
votes
2answers
1k views

Fastest way to convert shapefile to postgis in java

I have been using geotools to read shapefiles and import them into postgis. Unfortunately, when large files are being imported, this leads to a massive lag time --8000% of shp2pgsql piped into pgsql-- ...
2
votes
3answers
708 views

Postgis st_intersects fails on an obtained point on the line with the line itself

I am trying to split a line from its intersection with another line. I know I can use st_split directly here but I wish to split a line from several positions where it intersects other lines. What I ...
3
votes
1answer
227 views

Given a lat/long point, determine if it's land or water?

I have a PostGIS-enabled PostgreSQL 9.1 installation with the 10M physical dataset from Natural Earth imported. It's been converted to 900913, and in QGIS I can visualize the data. So the plumbing's ...
1
vote
0answers
127 views

Are there limitations with gdal virtual raster option?

I am new at Postgis and I'm groping... I pretend to rasterize some weighty vector layers in Postgis, do some map algebra and reclassification with them and visualize intermediate as well as final ...
2
votes
1answer
144 views

Keep .gdb structure to postgresql + PostGIS (Feature dataset)

I have a .gdb file with a specific structure. I will extract all shp files for uploading to a postgtresql db. But I want to keep the structure of gdb. How can I keep this structure to ...
0
votes
1answer
138 views

How to find features within a distance? [duplicate]

I insert the values from lat/long into the points. Those users move around and send me new Lat/long and of course , I made an update of the position. I need to find people that are in a distance ...
4
votes
2answers
7k views

How to connect OpenLayers to PostGIS data?

I have read in OpenLayers how to load KML, GeoJSON etc. vector files in OpenLayers. But how can I connect to PostGIS data. If not, why should I upload my data to PostGIS then instead of directly ...
3
votes
4answers
2k views

Calculate min distance between points in PostGIS

I have point layer in PostGIS database. Help please with query which add for each points in layer distance in attribute table between this point and another nearest point. Thanks! Update Calculate ...
2
votes
2answers
143 views

check postgis point geometry

I originated some points with incorrect geometries (ex: 1432.33 , 900.2 for EPSG4326) because lat/lon in data source where also incorrect. How can I detect in the_geom these incorrect ones? I ...
1
vote
1answer
342 views

How to create routable network by pgrouting with assign_vertex_id?

I'm trying to create the routable network as per http://underdark.wordpress.com/2011/02/07/a-beginners-guide-to-pgrouting/and use assign_vertex_id. Do I still need to create the node table? How would ...
0
votes
1answer
226 views

Get lon/lat of feature in postgis

I'm hava a problem I have a point layer (shapefile) insert to postgis! I'm using MapServer and OpenLayer to display layer on map! Now, i want get lon/lat all feature of layer! Hope somebody can help ...
5
votes
3answers
506 views

Adding a GIS feature to existing database entry with QGIS

I've built a database with postgreSQL with tables, which include geometry columns. When I add some data to my non-geometry columns, I can see them in QGIS when I connect to my database using postgis. ...
1
vote
0answers
495 views

How to merge linestrings which are connected with each other?

I would like to join linestrings which are connected to each other. The preferred output is a longer linestring based on all joined single linestings! The table that holds my single linestrings is ...
3
votes
1answer
348 views

Delete points outside a polygon with PostGis

I have to use PostGis because I have a very large database (more than 7 000 000 lines), but I am not used to work with PostGis; and since days, I would like to do that: Select and then delete all ...
4
votes
1answer
161 views

ST_Buffer won't accept bevel join styles (always displays as round)

I'm having a bit of trouble with ST_Buffer and join styles. Basically, if I try and use the bevel style it outputs as if I was using the round style. I notice that the ST_Buffer docs state that GEOS ...
3
votes
3answers
514 views

Visualization of a big graph in 3D from postgresql/postgis

We have a graph in 3D in a PostgreSQL/PostGIS database. It contains something like 50'000 edges and 50'000 vertices, with x-y coordinates and floors. We would like to visualize this graph with ...
1
vote
2answers
196 views

How to install postgis2.0 on Debian

How to install postgis2.0 on Debian6.0 and with Postgressql9.1 ? Didn't find any good repository ? Do you have to go all the way and compile ?
0
votes
0answers
77 views

Can I edit non geographic tables in geoexplorer?

I'm using postgis, geoserver and geoexplorer to manage my data. However I would like to edit non geographic tables in geoexplorer and edit a field feature based on other tables using a drop-down menu. ...
2
votes
1answer
112 views

Which is better for storage? Geometry column or varchar?

Objective: Need to store and retrieve a list of geometries from the database. Basically these are drawn by the user using OpenLayers which I would like to save and present again as a list (kind of ...
2
votes
1answer
486 views

Creating routable network table in PostGIS

I am trying to create the routable network table, as per http://underdark.wordpress.com/2011/02/07/a-beginners-guide-to-pgrouting/. Everytime I do it in PostGIS extension, QGIS crashes. The area is no ...
2
votes
1answer
336 views

Postgis shapfile and DBF loader 2.0 problem windows

I am trying to import a shapefile with polygons into Postgis (Windows 2008 server). If I import 100 polygons it works fine. If I try to import the full map of 8,100 polygons, about halfway I get an ...
1
vote
1answer
176 views

Is it possible to import Openlayer data to PostGIS?

I'm struggled with the following problem: I'd like to import an Openlayer Layer to PostGIS in order to have the layer information for each grid point in a table. I know how to create a layer from ...
3
votes
2answers
1k views

Automating batch load of multiple GPX files into PostGIS

I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, ...
3
votes
1answer
126 views

OpenGeo Suite PostGIS Data Location

I have OpenGeo Suite installed on a server. I want to have the PostGIS data stored on a different drive (D) on the server instead of on the C drive under my username. How do I do this?
5
votes
2answers
1k views

How to install PostGIS on Linux Mint 14?

I am trying to install PostGIS on Linux Mint 14 KDE. First thing I tried was to install PostgreSQL using "sudo apt-get install postgresql". I was successful doing that. I then did "sudo apt-get ...
2
votes
1answer
90 views

point of intersection issues

I have a table containing a set of points of intersections. Most of the roads intersects whith just one road BUT i have some roads which intersects with two, therefore three different point of ...
2
votes
2answers
153 views

Is it possible to use PostGIS on gisgraphy database?

I have the entire gisgraphy database inside my server. Is it possible to use PostGIS on it to query such as "get locations within 10 miles from this coordinate"? I tried reading about spatial queries ...
1
vote
1answer
111 views

Problem loading raster to PostGIS using QGIS

I am having trouble loading a raster (.asc) file to PostGIS 2.0.1 using the plugin Database - PostGIS Raster - Load raster to postgis in QGIS 1.8.0 on Win Vista 64 bit. I get the following error ...
1
vote
0answers
196 views

Break LINESTRING values in postgis into mutiple LINESTRINGs

Figure A below is the visual representation of what i have in my road data set. Line 1, Line 2, Line 3 in illustration are each represented as 1 row postgis DB inside a geometry column, some of these ...
3
votes
4answers
454 views

How can I create polygons of the area surrounded by roads / lines?

I'm currently trying to create polygons that represent the areas surrounded by roads. The roads are stored in PostGIS as points / lines so I have flexibility over what I can do with them. I'm ...
3
votes
2answers
166 views

Traversing a PostGIS table tree

I'm developing a geospatial db for a company that operates at a number of large facilities. Its primary purpose is to help staff locate themselves and equipment within each facilities' multi-storey ...
3
votes
1answer
457 views

How to put data in remote geoserver?

I created some layers and upload it to PostGIS and then GeoServer and then styled it using GeoExplorer. I have done all this in localhost. I used the iframe generated in GeoExplorer and used it in my ...
1
vote
1answer
498 views

PostGIS spacial data type to represent geo-located polygons

I have a PostgreSQL database with circle shaped objects called 'spots'. Each of those objects has latitude, longitude and a variable radius, information that I need to define this circles. Given an ...
1
vote
0answers
91 views

How can I snap 2 lines in QGIS so the st_distance between them is 0?

Sometimes when I snap the ends of 2 LineStrings together and I check the st_distance between those endpoints I get a value in the order of 1.1E-10 while at the same time when I check for equality of ...
2
votes
2answers
274 views

Why ST_Intersects() returns one row more than expected?

I am trying to understand the behaviour of ST_Intersects() in PostGIS. My goal is to get the mean value of a raster area corresponding to each polygon in a vector layer. To test my SQL I run ...
2
votes
1answer
280 views

Why doesn't PostGIS use gist index when doing a ST_DUMP(ST_UNION)?

My query: DROP TABLE IF EXISTS tmp; CREATE TEMP TABLE tmp AS SELECT *, ST_BUFFER(the_geom::GEOGRAPHY, 3000)::GEOMETRY AS buffer FROM af_modis_master LIMIT 20000; CREATE INDEX idx_tmp_the_geom ON tmp ...
1
vote
1answer
2k views

How to find out whether a lat/long position resides within a Polygon?

I'm working on a system that stores latitude/longitude information of addresses in a PostGIS table. To store Lat/Long in geometry data type I'm using ST_GeometryFromText function. For example the ...
1
vote
1answer
53 views

How to make sure that geometries copy the relationship of corresponding tables?

A make a database in PostgreSQL (9.2.2)/PostGIS (2.0.1). I'm new to it, so I'm not sure how to make sure that geometries corresponding to main table (polygons or points) cover the geometries ...
1
vote
1answer
90 views

Why is st_intersects giving bad results?

I am using PostgreSQL version 9.2.2 with PostGIS 2.0.2 (or just 2.0, not sure), and need to do simple queries to find points that intersect with a polygon. The following test case returns only ...
1
vote
1answer
653 views

Merging OSM files with OSMOSIS and import to Postgres with OSM2PGSQL

I have a problem merging and then importing two OSM files. I downloaded to distinct .osm-files from cloudmade. They are not sharing any geographical attribute (as the first is the country Monaco, the ...
3
votes
1answer
656 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 ...
0
votes
1answer
228 views

How to find the POI (points of interest) Within a Given Radius?

I have a table with x,y coordinates with the_geom column. Now I need to find the nodes (Points Of Interest) present in a given radius. Kindly help me in knowing how to find it. Thanks.
2
votes
4answers
423 views

Stuck in loading raster to PostGIS

I am running running Mac OS X (10.7.5), PostgreSQL (9.2) and PostGIS (2.0.2) (installed via Postgres.app). The PostGIS extension seems to work perfectly with vector and raster layers. Once I enable ...
5
votes
1answer
346 views

How to draw a line between two places with via-points?

I have prepared a GPS-tracking dataset, currently consisting of one table with stopping points and one table with the raw GPS-points. The first table contains a column for any stopping point showing ...
14
votes
2answers
1k views

How can I merge/collapse nearby and parallel road lines (eg. a dual-carriageway) into one single line?

I have a shapefile from OSM which contains all the roads within a city. Larger roads (like dual-carriageways) seem to have 2 parallel lines. I'd like to collapse / combine those into 1 line so I can ...
4
votes
2answers
282 views

Shapefile postgis database to be queried by GeoDjango

I would like to create a Postgres database (postgreslq-9.1 and postgis-2.0.2) storing several shapefiles but I am uncertain on how to implement it so I'm searching for some advices. I have already ...