PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.
3
votes
0answers
75 views
building larger polygons from smaller ones *without* a common id in PostGIS
I am looking for a means, using PostGIS, of reconstituting a set of polygons from tens of thousands of smaller polygon 'pieces'.
This is a simplified example, with the pieces shaded:
Unfortunately ...
0
votes
1answer
62 views
PostGIS Manager Load Error
I am using the PostGIS Manager Load data to PostGIS tool on a Windows install and am getting the following error:
Something's wrong:
["'shp2pgsql' is not recognized as an internal or external ...
1
vote
2answers
81 views
geography_columns and geometry_columns purpose
Can anyone tell me what the purpose of the the geography_columns view and the geometry_columns table are used for in a PostGIS database?
My geography_columns view is empty so I can't see what the ...
0
votes
2answers
107 views
QGIS: using postgis can I define a layer using sql?
I have a vector layer (call it master) that is stored in postgis and consists of a number of line segments.
I also have a collection of sub layers that consist of subsets of the master layer. I can ...
0
votes
1answer
32 views
PostGIS: Querying a record table and explanatory table
Basically I have two tables one containing a collection of records and one table that contains extra info about features in the first. i.e
Records Table:
GID
SITE
SPECIES
GEOM
and the second table ...
2
votes
2answers
132 views
How do I plot data stored in an attribute table (really in a database) in qgis
I have a csv of UK postcodes from Ordnance Survey that looks like
SE1 0AA,10,531869,179427,E92000001,E19000003,E18000007,E09000028,E05000536
When I import to QGIS using 'Add Delimited Text Layer', ...
1
vote
1answer
196 views
Count Points in Polygon with Postgis
I've got a simple problem: I want to count the number of points within a set of polygons.
I have a SQL already but it only gives back the gid of the polygone that actually contains points.
My ...
3
votes
4answers
156 views
converting oracle geometry to postgis with 3d data (wkt?)
I am converting Oracle spatial database to postgis. Most of of the spatial data is 2.5d. Meaning we have a Z-coordinate which indicates the depth/height of the element compared to soil level.
Getting ...
1
vote
3answers
137 views
finding the definition of missing srid in postgis
I am converting a spatial Oracle database to POSTGIS, and one of the problems I encounter is that we use SRID in Oracle that do not exist in POSTGIS.
I am talking about the following SRID:
90112 : ...
0
votes
1answer
341 views
Make POINT from longitude/latitude coordinates from existing table in PostGIS
I would like to make a POINT using the longitude and latitude columns of an existing table. Here's a link to the documentation of ST_MakePoint.
Here's my table:
CREATE TABLE sysinst.bio (
oid ...
2
votes
1answer
56 views
How to bulk import ESRI projections into Postgis
Where can I get a file that would allow me to bulk upload all of the ESRI projections into the spatial_ref_sys table of postgis. I know that you can get insert statements on spatialreference.org; ...
0
votes
1answer
35 views
Most efficient way to find if a polygon falls with in the boundary of another polygon using postgis
I have a polygon layer that contains some polygons inside of polygons. I need to be able to identify the polygons inside of polygons and discard the polygons inside of the polygons. What is the most ...
5
votes
3answers
110 views
In PostGIS, how to count nearby points efficiently?
I have one dataset A with around 6K point geometries and another dataset B with around 600K point geometries.
I am trying to come up with an efficient way to update dataset A with an integer ...
6
votes
4answers
237 views
How to calculate the “depth” of a linestring using postgis
I have linestring features, which look like bent linestrings, hemicycles or convex or concave linestrings. In the moment I can select the distance between the startpoint and endpoint of each feature. ...
1
vote
3answers
83 views
Copying schema of Postgis or Spatialite DB to blank one
I want to copy a Postgis or Spatialite DB sctructure (features, tables) to a blank DB. In ArcGIS i can easily handle it by using XML Workspace Document. Fisrtly extact it from a Geodatabase and than ...
1
vote
2answers
231 views
how can convert geometry type to geometry(Point)?
I think my question is stupid but I'm blocking. I just work with postgis ST_Line_Locate_Point function (linestring, point). to find the ends of lines. My problem is that my objects geometry type, not ...
5
votes
1answer
92 views
How to findout direction PostGIS
I want to find out the direction from the 2 points from postGIS database. Please see the attached image. I want to find out the direction from the mainPt to any point. But want to get the result as ...
1
vote
2answers
124 views
Load information about a feature
I must mention first of all that I am very new to this area... I am developing a GIS application. I created a simple map using geoserver with openlayers, it is all working through apache tomcat - and ...
3
votes
3answers
103 views
Bounded box on postgis
I have a few MULTIPOLYGON geometries that are very complex to work with, and I need to find POINT geometries from a ~40M rows that are inside these MULTIPOLYGON geometries.
Right now I'm working with ...
2
votes
1answer
109 views
PostGIS ST_Contains question
Here's a quick summary about what I'm trying to do: Let's say I got two layers. One (A) with 10 polygons and one that is more granular with 100 polygons (B). Just to check if the behavior of PostGIS ...
1
vote
1answer
55 views
segment lines according to point using pgRouting?
I'm working on postgresql and I am trying to create table to generate graphs. I have a table that contains all the objects of a city (points) and another contains the city street. My goal now is to ...
1
vote
0answers
120 views
Setting geometry types importing to PostGIS with OGR
I'm using ogr2ogr to import data into a PostGIS database. Each dataset I need to import has (theoretically) the same exact data structure, but it appears that they are not the same geometry types. ...
1
vote
1answer
681 views
Convert latitude longitude coordinate to x y coordinate?
I'm using a postgis database and java to develop my application.
I need to transform my geographic data currently in latitude/longitude format into a x/y format.
I found solutions based on UTM ...
0
votes
1answer
61 views
Is it possible to define a part of a geometry column as the Primary Key in a PostGIS database?
Is it possible to define a part of a geometry column as the Primary Key in a PostGIS database?
For example, when I want to store 3D points in a database, using the x/y coordinate as the primary key.
...
2
votes
1answer
82 views
QGIS, Postgis: Is it possible to create a new postgis layer?
Situation:
I have a postgis vector lay that has lots of line segments (the features). I want to create a set of new layers each of which contains a subset of the features of the original layer and ...
2
votes
1answer
40 views
QGIS: Making changes to vector layers stored in PostGIS
I have a vector layer stored in PostGIS. I split several lines in the layer and simplified others by removing vertices.
When I tried to save the changes to the layer I got postgres more postgres ...
2
votes
1answer
74 views
st_clip and gdal_translate: “Error browsing database for PostGIS Raster properties” - Why?
Im using shell-script, postgis2.0 and gdal for trying to clip raster apart, using an overlapping raster and a the_geom-object. At first I create a view to clip the overlapping part of the raster. It ...
1
vote
1answer
44 views
why sql file generated by postgis was different in notepad and pgAdminIII?
When i imported a shapefile which contains some polygons into PostGIS by command line on Win 7, a problem puzzled me:
The sql file generated by shp2pgsql opened with notePad has the geom ...
6
votes
2answers
86 views
PostGIS Union Between Two Tables, Preserving Attributes
I'm trying to union US State level upper- and lower-level government boundaries in such a way that generates one PostGIS table with both the upper and lower level names for each shape.
In my example ...
1
vote
1answer
98 views
How to alter this PostGIS ST_distance_sphere query to give the answer for all points in the table, not just one?
I have the following query which returns the expected result for a single point. I would like to alter this query to return the answer for every point in the table.
SELECT count(case when(
...
4
votes
1answer
174 views
How to speed up an st_intersects() query?
I have a "huge" spatial database: 72GB, 200 millions documents with geometries (points)
I have a GIST index on the geometries
the database:
CREATE TABLE resources
(
id bigint NOT NULL,
accuracy ...
5
votes
1answer
137 views
How can I snap lines in PostGIS?
I have a few linestrings that together form a long line. The start- and endpoints of the linestrings are equal with their direct neighbour, but when tested the ST_Distance between any 2 lines is like ...
1
vote
0answers
77 views
GeoDjango / PostGIS - Cut geometry by bounding box
I am looking for a solution to retrieve the geometry(ies) from a polygon/multipolygon within a bounding box in a GeoDjango application.
The application I am developing has a requirement to serve out ...
0
votes
2answers
92 views
error while loading osm2po routing sql-script into PostgreSQL
please advice what could be wrong in my situation:
I succesfully generated sql-file using osm2po
I tried to run it within PostgreSQL and got the following error:
********** Error **********
ERROR: ...
5
votes
2answers
185 views
Storing GPS tracks with timestamps in PostGIS
I need to store a series of GPS points with timestamps in the database (traces of various vehicles).
I am wondering which of two approaches to choose for storing them in the PostGIS table:
1.) Each ...
1
vote
0answers
145 views
working with multiple wfs-t layers
I am using multiple wfs layers and using editing tools in that like edit,draw,save etc.
The code is shown here......
var district = new OpenLayers.Layer.Vector("district(wfs)", {
...
1
vote
0answers
40 views
postgis union geometries in consecutive order
Database is postgres 9.2, POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8"
i have geometries in consecutive order. Here is query:
SELECT ...
7
votes
1answer
148 views
Is there a significantly faster way to buffer than arcmap?
I hope this question is appropriate here and I apologize if it is more of a discussion question than a specific technical problem.
I have to buffer 150,000 polygons for a real estate project. While ...
2
votes
0answers
127 views
Geoserver, PostGIS and KML: Creating clickable nodes from OSM data
I have a PostGIS database that has OSM data imported into it using osm2pgsql and I'm using GeoServer to plot the points into a networked KML file for Google Earth.
What I'd like to do is make the ...
2
votes
0answers
28 views
Automatic insert of project name into database
For every layer I've a field in my postGIS database that should be filled with the name of the current project and today I do this manually.
Is there a way to do this with the Commands that can be ...
0
votes
0answers
48 views
Problem in joined table
I test to join two postgis layers, one geometryc and other without geometryc data.
Data are loaded properly in qgis (1.8 in Osgeo4w distribution) and the joins seem been done properly but when i try ...
1
vote
0answers
55 views
Postgis walk through multilinestring
Maybe question title not correct, i have no idea how to formulate my question.
Database is postgres 9.2, POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.7.1, 23 September 2009" ...
2
votes
1answer
127 views
Connect to PostGIS using SEXTANTE in QGIS
I have a localhost PostGIS database that I would like to use with SEXTANTE in QGIS. I can connect to the database just fine using "Add PostGIS layers...", but when I try "PostGIS execute SQL" in ...
0
votes
0answers
222 views
QGIS 1.8.0-Lisboa DBmanager (OSx) can't connect to remote PostGIS 2.0.2 database (Debian)
The PostGIS database is remote but I have made changes to the Postgresql config files and can access it remotely via pgadmin.
When I open DBmanager in QGIS I see a note on the bottom that says ...
2
votes
1answer
96 views
PostgreSQL gid copy problem in Quantum GIS
When I enter new elements (features) in another Postgres layer, I
can do it in two ways:
Drawing new element(s) (with 'Add feature') which I do rarely or
Copying (or cutting) some elements from ...
0
votes
1answer
101 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
0answers
130 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 ...
2
votes
1answer
133 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
92 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 ...
4
votes
2answers
278 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-- ...






