Re: [postgis-users] A way to split polygons?

2011-03-03 Thread Paragon Corporation
> Mike Toews has suggested ST_Simplify or ST_SimplifyPreserveTopology, but I'm unsure of what value to use for the tolerance. The CRS is geographic, not projected. Simplifying in geographic never works well. What we usually do is pick a projected unit simplify in that and then convert back

Re: [postgis-users] How to info like \d command in Perl

2011-03-03 Thread Puthick Hok
Thanks heaps! Puthick Paragon Corporation wrote: Yes, query the geography_columns view (type column) for the said schema, table, column. You can also take a look and see how the view is built. It is built against the postgresql catalog tables so will always reflect the data type of the geogra

Re: [postgis-users] How to info like \d command in Perl

2011-03-03 Thread Paragon Corporation
Yes, query the geography_columns view (type column) for the said schema, table, column. You can also take a look and see how the view is built. It is built against the postgresql catalog tables so will always reflect the data type of the geography column. Leo http://www.postgis.us -O

[postgis-users] How to info like \d command in Perl

2011-03-03 Thread Puthick Hok
Hi, I am trying to find a way to retrieve the geography type of a Postgis column in Perl. Using these statements: my $datatype = $sth->{'TYPE'}->[$i]; my @type_info = $dbh->type_info([$datatype]); my $dtype_name = $type_info[0]->{'TYPE_NAME'}; The content of $dtype_name is 'unknown' which is

Re: [postgis-users] A way to split polygons?

2011-03-03 Thread Arnold Helmut Engelmann
If you want to go the tiling route and want to try that: Create a layer of tiles (boxes) at the size you want. Then run the following query: CREATE TABLE tiled_geo_units as SELECT ST_Intersection(a.geometry, b.geometry) AS geometry,

Re: [postgis-users] A way to split polygons?

2011-03-03 Thread Peter N. Schweitzer
On 03/03/2011 04:00 PM, pcr...@pcreso.com wrote: It sounds like you are wanting to tile your polygons. Not really ideal, as each polygon is rendered via tiles, so you need to render them without borders to hide the tiles, then often plot the border as well, which still has all the vertices. Lo

Re: [postgis-users] A way to split polygons?

2011-03-03 Thread pcreso
Hi Peter, It sounds like you are wanting to tile your polygons. Not really ideal, as each polygon is rendered via tiles, so you need to render them without borders to hide the tiles, then often plot the border as well, which still has all the vertices. Lots more work. You might look at simpl

Re: [postgis-users] A way to split polygons?

2011-03-03 Thread Mike Toews
Take a look at ST_Simplify http://postgis.refractions.net/docs/ST_Simplify.html Or ST_SimplifyPreserveTopology if you want to preserve boundaries: http://postgis.refractions.net/docs/ST_SimplifyPreserveTopology.html -Mike On 4 March 2011 09:44, Peter N. Schweitzer wrote: > > At http://tin.er.us

[postgis-users] A way to split polygons?

2011-03-03 Thread Peter N. Schweitzer
At http://tin.er.usgs.gov/geology/state/ and pages below it, I provide geologic map units for US states in KML for use within Google Earth. These are stored in PostgreSQL (9.0.2) with PostGIS (1.5.2). My problem is that many of the larger geologic units are represented as polygons that have a lar

Re: [postgis-users] Raster2pgsql.py Possible No Data Problem

2011-03-03 Thread Paragon Corporation
Andreas, How much memory do you have on your 64-bit desktop? I wonder if it would have made a difference using 32-bit python. I think the way 64-bit works, its actually worse if you don't have as much memory because the address space of each is larger. Then again I might not know what I am talk

Re: [postgis-users] Function to change order of lon/lat in WKT-string?

2011-03-03 Thread Paragon Corporation
Well its a new function in the upcoming PostGIS 2.0, but sadly doesn't exist in prior versions of PostGIS. http://www.postgis.org/documentation/manual-svn/ST_FlipCoordinates.html If you don't have issues with running a not yet released version of PostGIS, then you can use it. Hope that helps,

Re: [postgis-users] Spatio-Temporal Function

2011-03-03 Thread Jorge Gustavo Rocha
Hi, Qua, 2011-03-02 às 21:55 -0800, Nick raj escreveu: > Hi, > I am writing some spatio-temporal function in postgis. > Like, ST_Enters( obj_geom, boundary_geom, time t1,time t2) > i.e. Does vehicle enters in ABC area between time t1 to t2? > > For example, select ST_Enters ( obj_geom, (select bo

Re: [postgis-users] Raster2pgsql.py Possible No Data Problem

2011-03-03 Thread Andreas Forø Tollefsen
Very strange. The out of memory error i posted in my last post i got on my 64 bit desktop. I tried the excact same thing on my 32 bit laptop, and there i did not get a out of memory when importing to the postgis1.5 database. Andreas 2011/3/3 Andreas Forø Tollefsen > It seems I had some problems

[postgis-users] Function to change order of lon/lat in WKT-string?

2011-03-03 Thread Swärd Mårten
Hello folks! We, and by "we" I mean the developer team that I currently work in, are lookning for a PostGIS-function that can change the order of the coordinates in a WKT-string (lat/lon) to the "correct" way (lon/lat). 1. Is there such a function already in place? I can't find any.. 2. If not,

Re: [postgis-users] Raster2pgsql.py Possible No Data Problem

2011-03-03 Thread Andreas Forø Tollefsen
It seems I had some problems with my gdal python bindings. I downloaded the 64 bit Python 2.6 GDAL 1.7 bindings from here http://www.lfd.uci.edu/~gohlke/pythonlibs/. Now i can create the sql file. However. I have some new problems when importing. It works when i try to write the sql file to my Post