A version of the PostGIS open source spatial database
0
votes
0answers
13 views
Can driving_distance return all sets of distance from different starting points at one time?
I'm now using the extension of pgRouting, driving_distance, to search for the distance along the river system:
In the figure, the starting point is 3, but I want to get the distance starting from ...
0
votes
0answers
17 views
driving_distance does not return all sets of distance
As title, I am working with pgRouting, trying to get the distance matrix along the river system.
I use driving_distance function and it seems like I am getting what I want:
But when I check the ...
0
votes
0answers
13 views
publishing postgis raster in geoserver [duplicate]
I have stored a table of raster file through raster2pgsql in postgis. When i connect it to the geoserver and publish it, the bounding box limits are described illegal. Also the raster images are saved ...
1
vote
1answer
33 views
Postgis invalid geometry from shape file
I'm having trouble converting a Feature class (shape file) to a DB table (Postgresql 8.4/Postgis 1.5). This is the command in the pg log:
INSERT INTO "public"."distritos" ("Shape" , "DEPARTAMEN" , ...
0
votes
0answers
12 views
pgRouting:routing problems using reverse_cost
I saw this post:Routing issues with pgrouting, and try the ability of reverse_cost.
As the result of this post, if there is only one way to go from one node to another, even though the reverse_cost ...
0
votes
1answer
41 views
Can pgRouting work more efficiently?
I use a river network on which has a lot of nodes to test pgRouting,
and I run the SQL, searching for the shortest path between nodes.
SELECT * FROM shortest_path('
SELECT gid as id,
...
1
vote
1answer
51 views
pgRouting:how to use reverse_cost?
I add a new column, naming it "reverse_cost", and give it the same data in the shape_leng column.
But as I run the shortest path algorithm in pgadmin, I got an error message.
here's my sql code
...
0
votes
2answers
61 views
How to create a new column to store the length of a linestring in postgis?
I am working with pgRouting, following this nice guide:A Beginner’s Guide to pgRouting
I am now in this step:Calculating shortest routes, with these codes below
SELECT * FROM shortest_path('
SELECT ...
1
vote
0answers
102 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
130 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 ...
2
votes
3answers
124 views
ST_Covers: Geography Implementation is not working, Geometry Implementation taking too long
I have a query: (This query uses geographical implementation of ST_Covers function)
SELECT ST_Covers(ST_GeoGraphyFromText('MULTIPOLYGON(((179 -89,179 89,-179 89,-179 -89,179 ...
7
votes
1answer
221 views
How to split two interscting polygons by the average linestring of the shared area (QGIS / python shapely)
I have two polygons,
POLYGON((-5 -5,-5 5,5 5,5 -5,-5 -5))
POLYGON((1 1, 1 7, 7 7, 7 1, 1 1))
and wish to split them evenly.
The result should be a split along the red marked line.
I'm using ...
2
votes
2answers
375 views
raster2pgsql part of PostGIS?
Hi GIS Stackoverflow people,
I wanted to use the PostGIS functionality [raster2pgsql][1], but I had to discover that the Python function was not installed with my PostGIS installation.
Do you know ...
2
votes
1answer
293 views
How to relate Non-Spatial table to Spatial table in two different Postgis DBs?
I need to relate a Non-spatial table to Spatial table, but both are in different database.
Spatial_table(dbname:dist)
gid
district_name
district_code
geom
Non_Spatial(dbname:census)
ID
...
3
votes
0answers
265 views
How can I properly add PostGIS data into MapGuide Maestro?
I am having trouble connecting a PostGIS database to MapGuide Maestro. Actually, I have added the PostGIS data into Maestro, but when I click to validate the layer it shows an error message:
...
4
votes
1answer
211 views
Self-intersecting polygon using extreme values
I have this polygon
POLYGON((1.2E-15 1.1E-15,1.31E-15 1.21E-15,-180 -90,180 90,1.2E-15 1.1E-15))
It uses an extreme coordinates like (1.2E-15 1.1E-15) and (180 90)
When I call ST_isValidReason, ...
3
votes
2answers
175 views
Invoke PostGIS functions outside of the database? Need to force 3D in GeoDjango
I'm looking to ensure that all geometries saved to the database are three-dimensional. It's easy enough to do with a call to the database,
select ST_Force_3D( ST_GeomFromText( blah blah ) )
...but ...
4
votes
1answer
73 views
Using all dimensions with postgis functions
I have points as geometry format in table that I use for some analysis. All points are saved in four dimensions eg. x, y, z and m - lon, lat, alt and time. The issue is that for the analysis are used ...
0
votes
3answers
2k views
Get geometry from coordinates
I have a table with geometry column called point, saved in SRID 4326. I want to get the geometry by its coordinates, but something didn't work. I suspect database configuration or something.
Here is ...
1
vote
1answer
503 views
“Geometry” Problem while creating Postgis database on Ubuntu
I am trying to build pgrouting on ubuntu. Therefore, I now firstly try to create a Postgis database on ubuntu.
I am following the instructions on this site:
Installing PostGIS 1.5 on PostgreSQL 8.4 ...
5
votes
1answer
163 views
Spatial graphing, distribution of polygon area over latitudes
Given a polygon in a PostGIS database, what is the best way to create a graph of its distribution over a range of latitudes? I'm picturing a graph of a curve, where the proportion of the total area ...
7
votes
2answers
1k views
Postgis 2.0 upgrade problem with postgres data [SOLVED]
I have a serious problem:
on Wednesday, April 2 OpenSUSE 12.1 is updated, and the package was to update the PostGIS-a version 1.5.3 to 2.0.0.
After this operation, Postgres does not display records.
...
4
votes
1answer
786 views
Explode MULTILINESTRING into individual segments in PostGIS 1.5
I have a MULTILINESTRING in PostGIS consisting of several LINESTRING's. Consider each LINESTRING to have a set of POINT's
P1, P2, ... PN
forming the line segments
L1, L2, ... LN-1
where ...
1
vote
2answers
465 views
How to split a feature and save back to database?
How to split/cut a polygon through OpenLayers split method and same editing save to the PostGIS?
3
votes
3answers
2k views
how to create a new postgis database for usage with QGIS under windows
After installing postgresql with postgis under windows xp I have 3 databases:
postgis
postgres
template_postgis
now I try to create a new spatially enabled database in pgAdminIII: I select ...
5
votes
2answers
1k views
Can't import OSM data to PostGIS, permission denied
I use Postgres 9.1 on Xubuntu 11.10. I've created a db 'aus' and user 'aus', granted ALL on the db to the user. Now I try to import the data, and it outputs this error:
$ osm2pgsql --create ...
7
votes
2answers
1k views
PostGIS ST_Buffer Radius Help
I am trying to find all points within a five-mile radius of a given point. I have a query like this:
SELECT * FROM table WHERE ST_Contains(ST_Buffer(geomFromText('POINT(0 0)', 4326), ?), latlon)
I ...
5
votes
2answers
466 views
Creating a spatial PostGIS table as a result of a PostGIS query
When I want to store the results of a spatial query as another PostGIS table, what should I do? I am interested in identifying all residential buildings that fall within a set of parcels:
CREATE ...
2
votes
3answers
674 views
Inserting polygon centroids into an additional column in PostGIS
I'm trying to calculate the x and y centroids for a table using ST_Centroid. The documentation says that it returns the geometric center of a geometry. I first made a column X:
ALTER TABLE ...
4
votes
1answer
531 views
Geodjango distance between two points appears incorrect
I want to show you something. I am using django+postgis and I am experiencing wrong distance values between two points.
This is my model:
class Location(models.Model):
name = ...
4
votes
2answers
300 views
Does PostGIS not work with psql?
I have a sql script that creates several tables, a trigger, and a trigger function. All the commands work in pgAdmin when I execute them in the "Query" section. My goal is to put all these commands ...
8
votes
4answers
2k views
How to create a circle in PostGIS?
I'm using PostGIS 1.5.2, with geometries in SRID:900913.
I need create a circles using a list of points as centre, with a radius of 600 kilometers.
I'm using this query:
INSERT INTO circles (geom) (
...
6
votes
1answer
1k views
How to measure length of line accurately?
In postgis 1.5 for the below given query the answer is 1540651.62674101 meters ,
SELECT ST_Length(ST_GeomFromText('LINESTRING(77.83042478941326
9.98463896136159,78.03469506809812 23.90398909552571 ...
4
votes
1answer
304 views
Monster Spatial database server suggestions
I'm going to setup a open Mapserver w/ Openlayers, Geojango, Postgis using Postgresql. And I need some suggestions from people that have been shopping for what I need longer than I have.
What would ...
8
votes
2answers
551 views
Splitting polylines using regions with PostGIS
I was wondering if it is possible to split a polyline on polygon boundaries (regions) in PostGIS, the picture below is of what we have at the moment and showing where I need the polylines split:
...

