Re: [postgis-users] How compute the stats from a raster table.

2012-03-14 Thread Pierre Racine
ST_SummaryStats()

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Andrea Peri
> Sent: Wednesday, March 14, 2012 7:27 PM
> To: PostGIS Users Discussion
> Subject: [postgis-users] How compute the stats from a raster table.
> 
> Hi,
> 
> Try -ing to access with mapserver from a raster.table.
> I will have some problems.
> Now I discovered the problem was that mapserver try to compute the stats from
> my postgis raster.table and this will cause a timeout.
> 
> So I like to set programmatically these stats.
> 
> To find these values I could use the gdalinfo , but if possible I like to do 
> this
> inside the postgis.
> There is a function in postgis.raster api to compute the full stats of a 
> raster table
> ?
> 
> Thx,
> 
> --
> -
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -
> 

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Simplify a perfect (hierarchical) partition of polygons (ST_SimplifyPreserveTopology and friends)

2012-03-14 Thread Martin Tomko
Hi Sandro, William, all,
Thank you very much for the responses.

Sandro, this looks hopeful. I have checked and indeed the
addTopologyColumn method contains the integer specifying a child layer. I
"assume" that this is taken from the topology.layer table where each
topological layer is registered, right?

The "algorithm" noted by William is something of the type I had in mind,
but I think it still does not cater for the problem of reduced set of
controlled nodes in higher levels of hierarchy:
The algorithm was
 1. Simplify the smallest (admin2) units using the Simplify Polygon tool,
asking it to resolve topological errors.
2. Dissolve the generalized polygons on their parent id
3. Repeat 2 until I arrived at admin0


I am afraid that this will not cater for some problems (referring to
https://martintomko.files.wordpress.com/2012/03/hiera_generalization.png
now)
In this figure, the thin black lines are say suburbs, and the ticker
purple lines countiesŠ. Even when generalising the county boundaries, I
would want not only the "real" nodes of that hierarchical level (the blue
circles) to be respected, but also those of the previous level (red
circles). Of course, as we go higher, this reduces the generalization /
compression / but that is inevitable.


Sandro, you say:
Quote:
"Yes, it probably don't make sense to simplify single TopoGeoms in turn if
you know you're going to simplify the whole topology. In that case you
would
just make a copy of the topology and then simplify all edges on the copy.
Existing TopoGeometry objects (appropriately re-bound to the new topology)
would magically convert to a simplified version of simple geometries. Both
simple and hierarchical ones."


Is this a "wished for" functionality, or is this doable? I have little
experience with the topoGeom, a code snippet would make me very happy ;)

Thanks,
Martin


P.S.: I do not want to get into the flame of public institutions not
supporting pledges etc. Sometimes it is not for not willing to, but for
administrative reasons. While I am at an academic institution and I think
we could get access to "the dominant GIS system", I do not have it handy,
and we are an explicitly OS project. We are willing to contribute back
(also in due course to other projects, such as Geotools), but we cannot
contribute $, only code. For those interested, look up www.aurin.org.au


Martin Tomko


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Fwd: cut lines with points

2012-03-14 Thread Stephen Woodbridge
You might want to look at the book: "PostGIS In Action" pg 225 has a 
function to cut a linestring at point junctions.


Basically, you want to take your two points and construction a line like:

select astext(setsrid(makeline(pnt1, pnt2), 4326));

then get a collection of pieces of myline after we subtract your new 
line from it:


select astext(st_difference(myline, setsrid(makeline(pnt1, pnt2), 4326)));

This assumes your data is int SRID:4326, change as appropriate.

I have not tried this but give it a try and see how it works.

-Steve W

On 3/14/2012 4:59 PM, Pedro Costa wrote:

I forget the image...



 Mensagem Original 
Assunto:cut lines with points
Data:   Wed, 14 Mar 2012 20:59:14 +
De: Pedro Costa  
Para:   postgis-users@postgis.refractions.net




Hello to all,

This is my first mail to this list.
I have to do one thing and i need help for solving that fastly.
I have points and lines and I intend to cut the lines based on points.
Does anyone have any idea how to fix this quickly?

Attached is a picture to illustrate the problem.

thank you

Pedro




___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] [postgis-devel] PostGIS 2.0.0beta3

2012-03-14 Thread Salvatore Larosa
Everything is right in the beta3 version (r9502) for me!
All regression tests OK! 0 Failed!

Ready for takeoff!

Cheers!

-SL

Il giorno mer, 14/03/2012 alle 09.20 -0700, Paul Ramsey ha scritto:
> Hi All,
> 
> PostGIS 2.0.0beta3: http://postgis.org/download/postgis-2.0.0beta3.tar.gz
> Current open tickets: http://trac.osgeo.org/postgis/report/22
> 
> You'll note that the number of open tickets is getting close to zero.
> Like a rocket ship countdown, when we get to zero, we launch.
> 
> But we need your help now, more than ever. Please try out PostGIS 2.0.
> Download it, build it, make sure it works for you.
> 
> The most important tests now are migrations: can you migrate to
> PostGIS 2.0? If no, why? Let us know.
> 
> Thanks!!!
> ___
> postgis-devel mailing list
> postgis-de...@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] How compute the stats from a raster table.

2012-03-14 Thread Andrea Peri
Hi,

Try -ing to access with mapserver from a raster.table.
I will have some problems.
Now I discovered the problem was that mapserver try to compute the stats
from my postgis raster.table and this will cause a timeout.

So I like to set programmatically these stats.

To find these values I could use the gdalinfo , but if possible I like to
do this inside the postgis.
There is a function in postgis.raster api to compute the full stats of a
raster table ?

Thx,

-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Paul Ramsey
On Wed, Mar 14, 2012 at 2:41 PM, Andy Colson  wrote:
> ... and GeomFromText became ST_GeomFromText ...  Why did some drop the ST_
> and some have it added?

The external spatial functions got them added, so all match up to the
standards base. The internal functions, used for casts got them
stripped to match PostgreSQL convention: newtype(oldtype) is the
PostgreSQL standard casting function signature. There are some other
even more internal functions (type_in(), type_out()) that you don't
see or use that also had their st_ prefixes stripped. They really
should never have had them added in the first place.

P.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Andy Colson

On 3/14/2012 4:33 PM, Andy Colson wrote:

On 3/14/2012 3:46 PM, Sandro Santilli wrote:



Make sure you follow the "Hard upgrade" procedure described
on the PostGIS manual.
Should happily bring you from 9.0/1.5 to 9.1/2.0.
And we're all very interested in any problem with that.

--strk;


Ok, backup/restore worked... mostly, turns out I'm using st_box2d, which
looks like it's been re-named to box2d. Other functions came across ok.
I'll need to update my scripts before I can tell if everything works 100%.

-Andy




... and GeomFromText became ST_GeomFromText ...  Why did some drop the 
ST_ and some have it added?


-Andy
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Andy Colson

On 3/14/2012 3:46 PM, Sandro Santilli wrote:



Make sure you follow the "Hard upgrade" procedure described
on the PostGIS manual.
Should happily bring you from 9.0/1.5 to 9.1/2.0.
And we're all very interested in any problem with that.

--strk;


Ok, backup/restore worked... mostly, turns out I'm using st_box2d, which 
looks like it's been re-named to box2d.  Other functions came across ok. 
 I'll need to update my scripts before I can tell if everything works 100%.


-Andy

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Andy Colson

On 3/14/2012 4:02 PM, Sandro Santilli wrote:

On Wed, Mar 14, 2012 at 03:52:07PM -0500, Andy Colson wrote:

On 3/14/2012 3:46 PM, Sandro Santilli wrote:

On Wed, Mar 14, 2012 at 03:41:52PM -0500, Andy Colson wrote:



I'm now attempting backup pg 9.0 postgis 1.5, and restore it to my
new pg 9.1 postgis 2.0.


Make sure you follow the "Hard upgrade" procedure described
on the PostGIS manual.
Should happily bring you from 9.0/1.5 to 9.1/2.0.
And we're all very interested in any problem with that.



I'm looking at:

http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#hard_upgrade

and it says:

2. Do a fresh install of PostGIS in a new database ... Please refer
to Section 2.5, “Create a spatially-enabled database on PostgreSQL
lower than 9.1” for instructions on how to do this

I assume in my new PG 9.1 db I can just use create extension, right?


I think so.


Maybe the docs could say, (for<  9.1 go to this link, for>= 9.1 use
create extension).


I guess the problem is that we don't have a "Spatially-enable database"
chapter to link to (with<  9.1 and>= 9.1 childs).
Feel like filing a ticket for that ?

--strk;


I don't think you need a chapter.  How about just a link to:

http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#create_new_db_extensions

I don't have an account, so I guess I'd rather not create a ticket. :-(

Unless you really want me to :-)

-Andy


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Sandro Santilli
On Wed, Mar 14, 2012 at 03:52:07PM -0500, Andy Colson wrote:
> On 3/14/2012 3:46 PM, Sandro Santilli wrote:
> >On Wed, Mar 14, 2012 at 03:41:52PM -0500, Andy Colson wrote:
> >
> >
> >>I'm now attempting backup pg 9.0 postgis 1.5, and restore it to my
> >>new pg 9.1 postgis 2.0.
> >
> >Make sure you follow the "Hard upgrade" procedure described
> >on the PostGIS manual.
> >Should happily bring you from 9.0/1.5 to 9.1/2.0.
> >And we're all very interested in any problem with that.
> >
> 
> I'm looking at:
> 
> http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#hard_upgrade
> 
> and it says:
> 
> 2. Do a fresh install of PostGIS in a new database ... Please refer
> to Section 2.5, “Create a spatially-enabled database on PostgreSQL
> lower than 9.1” for instructions on how to do this
> 
> I assume in my new PG 9.1 db I can just use create extension, right?

I think so.

> Maybe the docs could say, (for < 9.1 go to this link, for >= 9.1 use
> create extension).

I guess the problem is that we don't have a "Spatially-enable database"
chapter to link to (with < 9.1 and >= 9.1 childs).
Feel like filing a ticket for that ?

--strk;

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Fwd: cut lines with points

2012-03-14 Thread Pedro Costa

I forget the image...



 Mensagem Original 
Assunto:cut lines with points
Data:   Wed, 14 Mar 2012 20:59:14 +
De: Pedro Costa 
Para:   postgis-users@postgis.refractions.net



Hello to all,

This is my first mail to this list.
I have to do one thing and i need help for solving that fastly.
I have points and lines and I intend to cut the lines based on points.
Does anyone have any idea how to fix this quickly?

Attached is a picture to illustrate the problem.

thank you

Pedro


<>___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] cut lines with points

2012-03-14 Thread Pedro Costa

Hello to all,

This is my first mail to this list.
I have to do one thing and i need help for solving that fastly.
I have points and lines and I intend to cut the lines based on points.
Does anyone have any idea how to fix this quickly?

Attached is a picture to illustrate the problem.

thank you

Pedro

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Andy Colson

On 3/14/2012 3:46 PM, Sandro Santilli wrote:

On Wed, Mar 14, 2012 at 03:41:52PM -0500, Andy Colson wrote:



I'm now attempting backup pg 9.0 postgis 1.5, and restore it to my
new pg 9.1 postgis 2.0.


Make sure you follow the "Hard upgrade" procedure described
on the PostGIS manual.
Should happily bring you from 9.0/1.5 to 9.1/2.0.
And we're all very interested in any problem with that.



I'm looking at:

http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#hard_upgrade

and it says:

2. Do a fresh install of PostGIS in a new database ... Please refer to 
Section 2.5, “Create a spatially-enabled database on PostgreSQL lower 
than 9.1” for instructions on how to do this



I assume in my new PG 9.1 db I can just use create extension, right? 
Maybe the docs could say, (for < 9.1 go to this link, for >= 9.1 use 
create extension).


-Andy

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Sandro Santilli
On Wed, Mar 14, 2012 at 03:41:52PM -0500, Andy Colson wrote:

> I followed the pg_upgrade instructions.
> 
> 1) run pg91/bin/inidb
> 2) install extensions (in this case postgis 2.0)
> 3) stop all versions of pg
> 4) run: pg91/bin/pg_upgrade (with paths to old and new)

Uhm, I guess by "extensions" they mean _real_ extensions,
and assuming the dump would only contain _real_ extensions.
PostGIS 1.5 wasn't an extension so won't work.

> It complained it could not load postgis-1.5 in the newdb, which is
> correct, because I installed postgis-2.0.

That would not necessarely be a problem.
The problem will be restoring old pl/pgsql functions, which doesn't
even give you an error message I guess.

> I'm now attempting backup pg 9.0 postgis 1.5, and restore it to my
> new pg 9.1 postgis 2.0.

Make sure you follow the "Hard upgrade" procedure described
on the PostGIS manual.
Should happily bring you from 9.0/1.5 to 9.1/2.0.
And we're all very interested in any problem with that.

--strk; 

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Andy Colson

On 3/14/2012 3:33 PM, Sandro Santilli wrote:

On Wed, Mar 14, 2012 at 03:14:54PM -0500, Andy Colson wrote:


I have a PG 9.0 with Postgis 1.5.  I tried to use pg_upgrade to PG
9.1 and Postgis 2.0, but, as you can probably guess, it doesn't
work.


How did you try pg_upgrade to postgis-2.0 ?
Doesn't pg_upgrade create a _new_ database and populates
with a dump of the old ?

--strk;

   ,--o-.
   |   __/  |Delivering high quality PostGIS 2.0 !
   |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
   `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


I followed the pg_upgrade instructions.

1) run pg91/bin/inidb
2) install extensions (in this case postgis 2.0)
3) stop all versions of pg
4) run: pg91/bin/pg_upgrade (with paths to old and new)

It complained it could not load postgis-1.5 in the newdb, which is 
correct, because I installed postgis-2.0.


I was trying to avoid backup/restore.  But after reading the Postgis 2 
docs, you have to anyway to get from 1.5 to 2... so pg_upgrade wont help 
any.


I'm now attempting backup pg 9.0 postgis 1.5, and restore it to my new 
pg 9.1 postgis 2.0.


-Andy

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Sandro Santilli
On Wed, Mar 14, 2012 at 03:14:54PM -0500, Andy Colson wrote:

> I have a PG 9.0 with Postgis 1.5.  I tried to use pg_upgrade to PG
> 9.1 and Postgis 2.0, but, as you can probably guess, it doesn't
> work.

How did you try pg_upgrade to postgis-2.0 ?
Doesn't pg_upgrade create a _new_ database and populates
with a dump of the old ?

--strk;

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Bborie Park


I have a PG 9.0 with Postgis 1.5. I tried to use pg_upgrade to PG 9.1
and Postgis 2.0, but, as you can probably guess, it doesn't work.

Would I have better success if I first upgraded to PG 9.0 and Postgis 2?
Do you think pg_upgrade might work after that?

-Andy


Andy,

You're probably best upgrading PG to 9.1 using pg_upgrade first.  Then 
upgrade PostGIS to 2.0.  PostGIS 2.0 requires a hard upgrade 
(dump/reload)...


http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#upgrading

-bborie

--
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkp...@ucdavis.edu
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Andy Colson

On 3/14/2012 11:20 AM, Paul Ramsey wrote:

Hi All,

PostGIS 2.0.0beta3: http://postgis.org/download/postgis-2.0.0beta3.tar.gz
Current open tickets: http://trac.osgeo.org/postgis/report/22

You'll note that the number of open tickets is getting close to zero.
Like a rocket ship countdown, when we get to zero, we launch.

But we need your help now, more than ever. Please try out PostGIS 2.0.
Download it, build it, make sure it works for you.

The most important tests now are migrations: can you migrate to
PostGIS 2.0? If no, why? Let us know.

Thanks!!!
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


I have a PG 9.0 with Postgis 1.5.  I tried to use pg_upgrade to PG 9.1 
and Postgis 2.0, but, as you can probably guess, it doesn't work.


Would I have better success if I first upgraded to PG 9.0 and Postgis 2? 
 Do you think pg_upgrade might work after that?


-Andy
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Skye Book
Yeah, this is what was fixed in r9499 by using the autoconf lib search or 
whatever the command is..

It indeed builds, but the regression tests fail..

-Skye

On Mar 14, 2012, at 4:11 PM, Charlie Sharpsteen wrote:

> On Wednesday, March 14, 2012 1:00:37 PM UTC-7, Charlie Sharpsteen wrote:
>   - 2.0.0beta2 can compile against the dependencies supplied for PostGIS 
> 1.5.x via `apt-get build-dep postgis` with the addition of GDAL 1.7.0 via 
> `apt-get install libgdal1-dev`. However, 2.0.0beta3, released today, and the 
> current SVN head fail during configure:
> 
> 
> RASTER: Raster support requested
> checking for GDAL >= 1.6.0... found
> checking gdal.h usability... yes
> checking gdal.h presence... yes
> checking for gdal.h... yes
> checking ogr_api.h usability... yes
> checking ogr_api.h presence... yes
> checking for ogr_api.h... yes
> checking cpl_conv.h usability... yes
> checking cpl_conv.h presence... yes
> checking for cpl_conv.h... yes
> checking for GDALAllRegister in -lgdal... no
> configure: error: could not find gdal
> 
> 
> This is odd, because running nm against the libraries shows that the symbol 
> is there:
> 
> vagrant@vagrant-64:~/postgis-2.0.0beta3$ nm --dynamic 
> /usr/lib/libgdal1.7.0.so | grep GDALAllRegister
> 0021a820 T GDALAllRegister
> 
> 
> Don't know if this is a bug in the latest beta, or a problem with Ubuntu's 
> GDAL 1.7.0 libraries. Any advice would be appreciated.
> 
> 
> -Charlie
> 
> Found the problem in config.log:
> 
> 
> configure:19617: gcc -o conftest  -I/usr/include/gdal  conftest.c -lgdal  
> -L/usr/lib -lgdal1.7.0 >&5
> /usr/bin/ld: cannot find -lgdal
> 
> 
> The configure script is trying to link against both libgdal and libgdal1.7.0, 
> but libgdal.so does not exist, only libgdal1.7.0.so. According to config.log, 
> this has been identified and stored in LIBGDAL_LDFLAGS:
> 
> 
> LIBGDAL_LDFLAGS='-L/usr/lib -lgdal1.7.0'
> 
> 
> But the test scripts are still trying to pass `-lgdal`. Looks like a bug in 
> the PostGIS configure script.
> 
> 
> -Charlie
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


Skye Book
(516) 816-4762

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Charlie Sharpsteen

On Wednesday, March 14, 2012 1:05:14 PM UTC-7, Sandro Santilli wrote:
>
> On Wed, Mar 14, 2012 at 01:00:37PM -0700, Charlie Sharpsteen wrote:
>
> >   - Without GEOS 3.3.2, PostGIS must be configured `--without-topology` 
> so 
> > this definitely knocks out a big chunk of 2.0 functionality.
>
> Yep, what about a GEOS ppa ?
>
> --strk;
>

Possible, but i'm trying to start simple---the fewer plates spinning on the 
stage the better.

-Charlie 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Charlie Sharpsteen
On Wednesday, March 14, 2012 1:00:37 PM UTC-7, Charlie Sharpsteen wrote:
>
>   - 2.0.0beta2 can compile against the dependencies supplied for PostGIS 
> 1.5.x via `apt-get build-dep postgis` with the addition of GDAL 1.7.0 via 
> `apt-get install libgdal1-dev`. However, 2.0.0beta3, released today, and 
> the current SVN head fail during configure:
>
>
> RASTER: Raster support requested
> checking for GDAL >= 1.6.0... found
> checking gdal.h usability... yes
> checking gdal.h presence... yes
> checking for gdal.h... yes
> checking ogr_api.h usability... yes
> checking ogr_api.h presence... yes
> checking for ogr_api.h... yes
> checking cpl_conv.h usability... yes
> checking cpl_conv.h presence... yes
> checking for cpl_conv.h... yes
> checking for GDALAllRegister in -lgdal... no
> configure: error: could not find gdal
>
>
> This is odd, because running nm against the libraries shows that the 
> symbol is there:
>
> vagrant@vagrant-64:~/postgis-2.0.0beta3$ nm --dynamic /usr/lib/
> libgdal1.7.0.so | grep GDALAllRegister
> 0021a820 T GDALAllRegister
>
>
> Don't know if this is a bug in the latest beta, or a problem with Ubuntu's 
> GDAL 1.7.0 libraries. Any advice would be appreciated.
>
>
> -Charlie
>

Found the problem in config.log:


configure:19617: gcc -o conftest  -I/usr/include/gdal  conftest.c 
-lgdal  -L/usr/lib -lgdal1.7.0 >&5
/usr/bin/ld: cannot find -lgdal


The configure script is trying to link against both libgdal and 
libgdal1.7.0, but libgdal.so does not exist, only libgdal1.7.0.so. 
According to config.log, this has been identified and stored in 
LIBGDAL_LDFLAGS:


LIBGDAL_LDFLAGS='-L/usr/lib -lgdal1.7.0'


But the test scripts are still trying to pass `-lgdal`. Looks like a bug in 
the PostGIS configure script.


-Charlie
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Stephen V. Mather
For compiling 2.0 for Ubuntu, I’d recommend doing a custom build of GDAL 1.9 
with GEOS 3.3.2—otherwise you’ll have the package manager bringing in GEOS 
3.2.x for GDAL 1.7, and then you’ll have two GEOS libraries floating out there… 
.  Might fix the problem below too.

 

http://www.clemetparks.com/images/esig/cmp-ms-90x122.pngStephen Mather
Geographic Information Systems (GIS) Manager
(216) 635-3243

s...@clevelandmetroparks.com
  clevelandmetroparks.com

 

 

 

 

From: postgis-users-boun...@postgis.refractions.net 
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Charlie 
Sharpsteen
Sent: Wednesday, March 14, 2012 4:01 PM
To: postgis-us...@googlegroups.com
Cc: Charlie Sharpsteen; PostGIS Users Discussion
Subject: Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 
beta releases?

 

On Wednesday, March 14, 2012 8:44:16 AM UTC-7, Charlie Sharpsteen wrote:

On Wednesday, March 14, 2012 8:40:22 AM UTC-7, Charlie Sharpsteen wrote:

It does look like a GDAL upgrade to 1.9 would be a good idea though if the 
final version will require it. I have plenty of experience building this stuff 
from maintaining most of the GIS stack for the Homebrew package manager on OS 
X. Entirely new to Debian packaging though, so that will slow me down quite a 
bit.

 

-Charlie

 

Actually, after re-reading the installation notes, it doesn't look like GDAL 
1.9 is mandatory---just that GDAL >= 1.6 will be mandatory once PostGIS 2.0 is 
released.

 

-Charlie

 

Allright, took a few jabs at this and here is what I have found so far:

 

  - Without GEOS 3.3.2, PostGIS must be configured `--without-topology` so this 
definitely knocks out a big chunk of 2.0 functionality.

 

  - 2.0.0beta2 can compile against the dependencies supplied for PostGIS 1.5.x 
via `apt-get build-dep postgis` with the addition of GDAL 1.7.0 via `apt-get 
install libgdal1-dev`. However, 2.0.0beta3, released today, and the current SVN 
head fail during configure:

 

 

RASTER: Raster support requested

checking for GDAL >= 1.6.0... found

checking gdal.h usability... yes

checking gdal.h presence... yes

checking for gdal.h... yes

checking ogr_api.h usability... yes

checking ogr_api.h presence... yes

checking for ogr_api.h... yes

checking cpl_conv.h usability... yes

checking cpl_conv.h presence... yes

checking for cpl_conv.h... yes

checking for GDALAllRegister in -lgdal... no

configure: error: could not find gdal

 

 

This is odd, because running nm against the libraries shows that the symbol is 
there:

 

vagrant@vagrant-64:~/postgis-2.0.0beta3$ nm --dynamic /usr/lib/libgdal1.7.0.so 
| grep GDALAllRegister

0021a820 T GDALAllRegister

 

 

Don't know if this is a bug in the latest beta, or a problem with Ubuntu's GDAL 
1.7.0 libraries. Any advice would be appreciated.

 

 

-Charlie

<>___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Bborie Park

On 03/14/2012 01:00 PM, Charlie Sharpsteen wrote:

On Wednesday, March 14, 2012 8:44:16 AM UTC-7, Charlie Sharpsteen wrote:


On Wednesday, March 14, 2012 8:40:22 AM UTC-7, Charlie Sharpsteen wrote:


It does look like a GDAL upgrade to 1.9 would be a good idea though if
the final version will require it. I have plenty of experience building
this stuff from maintaining most of the GIS stack for the Homebrew package
manager on OS X. Entirely new to Debian packaging though, so that will slow
me down quite a bit.

-Charlie



Actually, after re-reading the installation notes, it doesn't look like
GDAL 1.9 is mandatory---just that GDAL>= 1.6 will be mandatory once
PostGIS 2.0 is released.

-Charlie



Allright, took a few jabs at this and here is what I have found so far:

   - Without GEOS 3.3.2, PostGIS must be configured `--without-topology` so
this definitely knocks out a big chunk of 2.0 functionality.

   - 2.0.0beta2 can compile against the dependencies supplied for PostGIS
1.5.x via `apt-get build-dep postgis` with the addition of GDAL 1.7.0 via
`apt-get install libgdal1-dev`. However, 2.0.0beta3, released today, and
the current SVN head fail during configure:


RASTER: Raster support requested
checking for GDAL>= 1.6.0... found
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking ogr_api.h usability... yes
checking ogr_api.h presence... yes
checking for ogr_api.h... yes
checking cpl_conv.h usability... yes
checking cpl_conv.h presence... yes
checking for cpl_conv.h... yes
checking for GDALAllRegister in -lgdal... no
configure: error: could not find gdal


This is odd, because running nm against the libraries shows that the symbol
is there:

vagrant@vagrant-64:~/postgis-2.0.0beta3$ nm --dynamic
/usr/lib/libgdal1.7.0.so | grep GDALAllRegister
0021a820 T GDALAllRegister


Don't know if this is a bug in the latest beta, or a problem with Ubuntu's
GDAL 1.7.0 libraries. Any advice would be appreciated.




I'd call it a bug in Ubuntu's GDAL.  If you called

gdal-config --libs

the output is

-L/usr/lib -lgdal1.7.0

which is something special for the debian/Ubuntu packages.  It probably 
is so that you can have multiple GDAL library packages.


I just fixed this earlier today (after Beta3 got released) for someone 
on IRC.  Try r9499.


-bborie

--
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkp...@ucdavis.edu
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Sandro Santilli
On Wed, Mar 14, 2012 at 01:00:37PM -0700, Charlie Sharpsteen wrote:

>   - Without GEOS 3.3.2, PostGIS must be configured `--without-topology` so 
> this definitely knocks out a big chunk of 2.0 functionality.

Yep, what about a GEOS ppa ?

--strk;

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Charlie Sharpsteen
On Wednesday, March 14, 2012 8:44:16 AM UTC-7, Charlie Sharpsteen wrote:
>
> On Wednesday, March 14, 2012 8:40:22 AM UTC-7, Charlie Sharpsteen wrote:
>>
>> It does look like a GDAL upgrade to 1.9 would be a good idea though if 
>> the final version will require it. I have plenty of experience building 
>> this stuff from maintaining most of the GIS stack for the Homebrew package 
>> manager on OS X. Entirely new to Debian packaging though, so that will slow 
>> me down quite a bit.
>>
>> -Charlie
>>
>
> Actually, after re-reading the installation notes, it doesn't look like 
> GDAL 1.9 is mandatory---just that GDAL >= 1.6 will be mandatory once 
> PostGIS 2.0 is released.
>
> -Charlie
>

Allright, took a few jabs at this and here is what I have found so far:

  - Without GEOS 3.3.2, PostGIS must be configured `--without-topology` so 
this definitely knocks out a big chunk of 2.0 functionality.

  - 2.0.0beta2 can compile against the dependencies supplied for PostGIS 
1.5.x via `apt-get build-dep postgis` with the addition of GDAL 1.7.0 via 
`apt-get install libgdal1-dev`. However, 2.0.0beta3, released today, and 
the current SVN head fail during configure:


RASTER: Raster support requested
checking for GDAL >= 1.6.0... found
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking ogr_api.h usability... yes
checking ogr_api.h presence... yes
checking for ogr_api.h... yes
checking cpl_conv.h usability... yes
checking cpl_conv.h presence... yes
checking for cpl_conv.h... yes
checking for GDALAllRegister in -lgdal... no
configure: error: could not find gdal


This is odd, because running nm against the libraries shows that the symbol 
is there:

vagrant@vagrant-64:~/postgis-2.0.0beta3$ nm --dynamic 
/usr/lib/libgdal1.7.0.so | grep GDALAllRegister
0021a820 T GDALAllRegister


Don't know if this is a bug in the latest beta, or a problem with Ubuntu's 
GDAL 1.7.0 libraries. Any advice would be appreciated.


-Charlie
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] PostGIS 2.0.0beta3

2012-03-14 Thread Paul Ramsey
Hi All,

PostGIS 2.0.0beta3: http://postgis.org/download/postgis-2.0.0beta3.tar.gz
Current open tickets: http://trac.osgeo.org/postgis/report/22

You'll note that the number of open tickets is getting close to zero.
Like a rocket ship countdown, when we get to zero, we launch.

But we need your help now, more than ever. Please try out PostGIS 2.0.
Download it, build it, make sure it works for you.

The most important tests now are migrations: can you migrate to
PostGIS 2.0? If no, why? Let us know.

Thanks!!!
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Charlie Sharpsteen
On Wednesday, March 14, 2012 8:40:22 AM UTC-7, Charlie Sharpsteen wrote:
>
> It does look like a GDAL upgrade to 1.9 would be a good idea though if the 
> final version will require it. I have plenty of experience building this 
> stuff from maintaining most of the GIS stack for the Homebrew package 
> manager on OS X. Entirely new to Debian packaging though, so that will slow 
> me down quite a bit.
>
> -Charlie
>

Actually, after re-reading the installation notes, it doesn't look like 
GDAL 1.9 is mandatory---just that GDAL >= 1.6 will be mandatory once 
PostGIS 2.0 is released.

-Charlie 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Charlie Sharpsteen

On Wednesday, March 14, 2012 8:32:50 AM UTC-7, Denis Rouzaud wrote:
>
>  You are right, but there notices in 
> http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#id2744974
>
> GEOS geometry library, version 3.2.2 or greater, but GEOS 3.3.2+ is 
> recommended. Without GEOS 3.3, you will be missing some major enhancements 
> with handling of topological exceptions and improvements to geometry 
> validation and making geometries valid such as ST_ValidDetail and 
> ST_MakeValid. GEOS 3.3.2+ is also required for topology support. GEOS is 
> available for download fromhttp://trac.osgeo.org/geos/ 
> and 
> 3.3+ is backward-compatible with older versions so fairly safe to upgrade.
>
> GDAL, version 1.6 or higher (1.9 or higher is preferable since some things 
> will not work well with lower versions). This is needed for raster support 
> and will be required in final release of PostGIS 2.0. 
> http://trac.osgeo.org/gdal/wiki/DownloadSource.
>
> I am no expert, but I am not sure it's good idea to deliver builds of 
> postgis in a sub-optimal config. 
>

Well, a sub-optimal build gets more work done than no build any day of the 
week. Plus, all of this work has to be done eventually---easier to improve 
something than start from scratch.

It does look like a GDAL upgrade to 1.9 would be a good idea though if the 
final version will require it. I have plenty of experience building this 
stuff from maintaining most of the GIS stack for the Homebrew package 
manager on OS X. Entirely new to Debian packaging though, so that will slow 
me down quite a bit.

-Charlie

On Wednesday, March 14, 2012 8:32:50 AM UTC-7, Denis Rouzaud wrote:
>
>  You are right, but there notices in 
> http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#id2744974
>
> GEOS geometry library, version 3.2.2 or greater, but GEOS 3.3.2+ is 
> recommended. Without GEOS 3.3, you will be missing some major enhancements 
> with handling of topological exceptions and improvements to geometry 
> validation and making geometries valid such as ST_ValidDetail and 
> ST_MakeValid. GEOS 3.3.2+ is also required for topology support. GEOS is 
> available for download fromhttp://trac.osgeo.org/geos/ 
> and 
> 3.3+ is backward-compatible with older versions so fairly safe to upgrade.
>
> GDAL, version 1.6 or higher (1.9 or higher is preferable since some things 
> will not work well with lower versions). This is needed for raster support 
> and will be required in final release of PostGIS 2.0. 
> http://trac.osgeo.org/gdal/wiki/DownloadSource.
>
> I am no expert, but I am not sure it's good idea to deliver builds of 
> postgis in a sub-optimal config.
>
>
>
>
>
> On 03/14/2012 04:29 PM, Charlie Sharpsteen wrote: 
>
> On Wednesday, March 14, 2012 8:21:48 AM UTC-7, Denis Rouzaud wrote: 
>>
>>  That would be amazing.
>> But, there is no ppa for geos 3.3 either and I am not sure about gdal 
>> 1.9...
>> It might be a little early to have a ppa repo and dependencies with 
>> unavailable packages
>>
>> My 2 cents.
>>  
>  
> Pretty sure I built PostGIS from source against GDAL 1.7 and GEOS 3.2.2 
> from the Oneiric standard repository.
>
>  Are there any critical functions that are inactive without the latest 
> and greatest versions of these libraries?
>
>  -Charlie 
>
>  
> ___
> postgis-users mailing 
> listpostgis-users@postgis.refractions.nethttp://postgis.refractions.net/mailman/listinfo/postgis-users
>
>  ___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Skye Book
As of some time during the alpha releases, it started wanting Geos 3.3..  Not 
sure what functionality is touching the dependency thiough

-Skye

On Mar 14, 2012, at 11:29 AM, Charlie Sharpsteen wrote:

> On Wednesday, March 14, 2012 8:21:48 AM UTC-7, Denis Rouzaud wrote:
> That would be amazing.
> But, there is no ppa for geos 3.3 either and I am not sure about gdal 1.9...
> It might be a little early to have a ppa repo and dependencies with 
> unavailable packages
> 
> My 2 cents.
>  
> Pretty sure I built PostGIS from source against GDAL 1.7 and GEOS 3.2.2 from 
> the Oneiric standard repository.
> 
> Are there any critical functions that are inactive without the latest and 
> greatest versions of these libraries?
> 
> -Charlie 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Denis Rouzaud
You are right, but there notices in 
http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#id2744974


GEOS geometry library, version 3.2.2 or greater, but GEOS 3.3.2+ is 
recommended. Without GEOS 3.3, you will be missing some major 
enhancements with handling of topological exceptions and improvements to 
geometry validation and making geometries valid such as ST_ValidDetail 
and ST_MakeValid. GEOS 3.3.2+ is also required for topology support. 
GEOS is available for download fromhttp://trac.osgeo.org/geos/and 3.3+ 
is backward-compatible with older versions so fairly safe to upgrade.


GDAL, version 1.6 or higher (1.9 or higher is preferable since some 
things will not work well with lower versions). This is needed for 
raster support and will be required in final release of PostGIS 
2.0.http://trac.osgeo.org/gdal/wiki/DownloadSource.


I am no expert, but I am not sure it's good idea to deliver builds of 
postgis in a sub-optimal config.






On 03/14/2012 04:29 PM, Charlie Sharpsteen wrote:

On Wednesday, March 14, 2012 8:21:48 AM UTC-7, Denis Rouzaud wrote:

That would be amazing.
But, there is no ppa for geos 3.3 either and I am not sure about
gdal 1.9...
It might be a little early to have a ppa repo and dependencies
with unavailable packages

My 2 cents.

Pretty sure I built PostGIS from source against GDAL 1.7 and GEOS 
3.2.2 from the Oneiric standard repository.


Are there any critical functions that are inactive without the latest 
and greatest versions of these libraries?


-Charlie


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Charlie Sharpsteen
On Wednesday, March 14, 2012 8:21:48 AM UTC-7, Denis Rouzaud wrote:
>
>  That would be amazing.
> But, there is no ppa for geos 3.3 either and I am not sure about gdal 
> 1.9...
> It might be a little early to have a ppa repo and dependencies with 
> unavailable packages
>
> My 2 cents.
>
 
Pretty sure I built PostGIS from source against GDAL 1.7 and GEOS 3.2.2 
from the Oneiric standard repository.

Are there any critical functions that are inactive without the latest and 
greatest versions of these libraries?

-Charlie 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Denis Rouzaud

That would be amazing.
But, there is no ppa for geos 3.3 either and I am not sure about gdal 1.9...
It might be a little early to have a ppa repo and dependencies with 
unavailable packages


My 2 cents.

On 03/14/2012 04:18 PM, Charlie Sharpsteen wrote:

On Wednesday, March 14, 2012 12:02:24 AM UTC-7, Sandro Santilli wrote:

On Tue, Mar 13, 2012 at 07:50:32PM -0700, Charlie Sharpsteen wrote:

> I was wondering if anyone has a Personal Package Archive for
Ubuntu that is
> tracking the 2.0 beta releases. I looked at the UbuntuGIS and
Postgis
> project pages on Launchpad, but the only releases listed there
were for
> 1.5.x. Even the unstable repostory of UbuntuGIS was still
tracking 1.5.x.

I'm not aware of any. It'd be very welcome if you want to setup one.

--strk;


Allright, I'll take a shot at it. Looks like there is a Launchpad 
repository that is synching with PostGIS SVN every 6 hours or 
so---perhaps I can get a nightly build set up.


-Charlie


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Charlie Sharpsteen
On Wednesday, March 14, 2012 12:02:24 AM UTC-7, Sandro Santilli wrote:
>
> On Tue, Mar 13, 2012 at 07:50:32PM -0700, Charlie Sharpsteen wrote:
>
> > I was wondering if anyone has a Personal Package Archive for Ubuntu that 
> is 
> > tracking the 2.0 beta releases. I looked at the UbuntuGIS and Postgis 
> > project pages on Launchpad, but the only releases listed there were for 
> > 1.5.x. Even the unstable repostory of UbuntuGIS was still tracking 1.5.x.
>
> I'm not aware of any. It'd be very welcome if you want to setup one.
>
> --strk;
>

Allright, I'll take a shot at it. Looks like there is a Launchpad 
repository that is synching with PostGIS SVN every 6 hours or so---perhaps 
I can get a nightly build set up.

-Charlie
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Simplify a perfect (hierarchical) partition of polygons (ST_SimplifyPreserveTopology and friends)

2012-03-14 Thread 'Sandro Santilli'
On Wed, Mar 14, 2012 at 02:09:30PM +0100, William Humphrey Temperley wrote:

> Practical means "getting stuff done" in my book.  Open source is always my
> first port of call, but I won't conform to a religion.  I'm looking forward
> to trying out your topology work - but when it's practical to do so!

I've been discussing this earlier this morning and figured that
you can probably get this done pretty easily with PostGIS 2.0,
by adding a topology-aware ST_Simplify version so and avoid
creating persistent simplified topology schemas.

> I agree it is a shame that it is rare for open source software to be funded
> by public institutions, especially when even small change for them would
> make a difference.  I can't comment on the EC stance on this.

Incidentally, most of the 2.0 topology work was funded by the Italian
Tuscany Region, and there are actually an handful of other public
institutions among the so called "corporate sponsors". It's just a shame
not to see the JRC in there...

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Simplify a perfect (hierarchical) partition of polygons (ST_SimplifyPreserveTopology and friends)

2012-03-14 Thread William Humphrey Temperley


> -Original Message-
> From: Sandro Santilli [mailto:sandro.santi...@gmail.com] On Behalf Of
Sandro
> Santilli
> Sent: 14 March 2012 10:35
> To: PostGIS Users Discussion
> Cc: William Humphrey Temperley
> Subject: Re: [postgis-users] Simplify a perfect (hierarchical) partition
of
> polygons (ST_SimplifyPreserveTopology and friends)
> 
> On Wed, Mar 14, 2012 at 10:11:13AM +0100, William Humphrey Temperley
> wrote:
> 
> > I recently did this for the Global Administrative Unit Layers (GAUL)
> > stored in PostGIS using the simplify polygon tools in ArcGIS.  Whilst
> > I'd love to use the new topology tools Sandro has developed, this
> > wasn't practical at this time.
> >
> > The steps I took were:
> > 1. Simplify the smallest (admin2) units using the Simplify Polygon
> > tool, asking it to resolve topological errors.
> > 2. Dissolve the generalized polygons on their parent id 3. Repeat 2
> > until I arrived at admin0
> >
> > Each time I had to reload the new geometries back into PostGIS.
> 
> You missed this step:
> 
>  0. buy an ArcGIS license.
> 
> You know I've been working at the JRC for 1 year ?
> Had to wait to get out of there in order to bring some love to the PostGIS
> topology support. Not a single euro was spent by the EC on it. Not even a
slot
> of the pledge [1] was taken.
> 
> [1] http://pledgebank.com/postgistopology
> 
> On the other hand milions are spent by JRC on Oracle and ESRI licenses so
I
> guess "practical" is really a subjective matter.
> 

Yep I did know you were working here at the JRC :)  

Chances are the OP (Martin Tomko) has an Arc license available as he's in an
academic institution.

Practical means "getting stuff done" in my book.  Open source is always my
first port of call, but I won't conform to a religion.  I'm looking forward
to trying out your topology work - but when it's practical to do so!

I agree it is a shame that it is rare for open source software to be funded
by public institutions, especially when even small change for them would
make a difference.  I can't comment on the EC stance on this.

Ciao, 

Will



___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ST_Buffer internals

2012-03-14 Thread Charles Galpin
It's just a series of points which you can position in a curve. The more 
points, the smoother the curve.

charles

On Mar 14, 2012, at 5:24 AM, Ed Linde wrote:

> Is a LINESTRING always a straight line in postgis? Or can there be a 
> curvature? I didn't get that from the documentation.

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Simplify a perfect (hierarchical) partition of polygons (ST_SimplifyPreserveTopology and friends)

2012-03-14 Thread Sandro Santilli
On Wed, Mar 14, 2012 at 10:11:13AM +0100, William Humphrey Temperley wrote:

> I recently did this for the Global Administrative Unit Layers (GAUL) stored
> in PostGIS using the simplify polygon tools in ArcGIS.  Whilst I'd love to
> use the new topology tools Sandro has developed, this wasn't practical at
> this time.
> 
> The steps I took were:
> 1. Simplify the smallest (admin2) units using the Simplify Polygon tool,
> asking it to resolve topological errors.
> 2. Dissolve the generalized polygons on their parent id 
> 3. Repeat 2 until I arrived at admin0 
> 
> Each time I had to reload the new geometries back into PostGIS.

You missed this step:
 
 0. buy an ArcGIS license.

> Will Temperley
> Spatial Database Developer
> Land Resource Management Unit
> European Commission - Joint Research Centre

You know I've been working at the JRC for 1 year ?
Had to wait to get out of there in order to bring some love
to the PostGIS topology support. Not a single euro was spent
by the EC on it. Not even a slot of the pledge [1] was taken.

[1] http://pledgebank.com/postgistopology

On the other hand milions are spent by JRC on Oracle and ESRI
licenses so I guess "practical" is really a subjective matter.

--strk;

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net 
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ST_Buffer internals

2012-03-14 Thread Ed Linde
Is a LINESTRING always a straight line in postgis? Or can there be a
curvature? I didn't get that from the documentation.

On Wed, Mar 14, 2012 at 10:04 AM, Ed Linde  wrote:

> Hi All,
> I am wondering how ST_Buffer computes a buffer around say a LINESTRING?
> How can I look at the internals of this?
> Is it possible to achieve the same effect using GDAL's C++ API? I ask
> because I have a very large LIDAR 3-D data set
> which I cannot load into Postgis, but I would certainly want to understand
> how postgis achieves some of it's
> functionality, to get some ideas. Would love to hear some explanations or
> ideas about how to do this!
>
> Cheers,
> Ed
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Simplify a perfect (hierarchical) partition of polygons (ST_SimplifyPreserveTopology and friends)

2012-03-14 Thread William Humphrey Temperley


> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Martin Tomko
> Sent: 14 March 2012 01:20
> To: postgis-users@postgis.refractions.net
> Subject: Re: [postgis-users] Simplify a perfect (hierarchical) partition
of
> polygons (ST_SimplifyPreserveTopology and friends)
> 
 
> I think that the best way for this hierarchical scenarios is to start from
the
> finest geographies and aggregate upwards on the generalised ones. I will
> have to somehow control for the intermediate nodes that are not valid for
> higher order geometries (joins of suburbs on the state boundary, etcŠ),
but
> that I could solve somehow.
> 

Martin,

I recently did this for the Global Administrative Unit Layers (GAUL) stored
in PostGIS using the simplify polygon tools in ArcGIS.  Whilst I'd love to
use the new topology tools Sandro has developed, this wasn't practical at
this time.

The steps I took were:
1. Simplify the smallest (admin2) units using the Simplify Polygon tool,
asking it to resolve topological errors.
2. Dissolve the generalized polygons on their parent id 
3. Repeat 2 until I arrived at admin0 

Each time I had to reload the new geometries back into PostGIS.

HTH,

Will Temperley
Spatial Database Developer
Land Resource Management Unit
European Commission - Joint Research Centre



___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] ST_Buffer internals

2012-03-14 Thread Ed Linde
Hi All,
I am wondering how ST_Buffer computes a buffer around say a LINESTRING? How
can I look at the internals of this?
Is it possible to achieve the same effect using GDAL's C++ API? I ask
because I have a very large LIDAR 3-D data set
which I cannot load into Postgis, but I would certainly want to understand
how postgis achieves some of it's
functionality, to get some ideas. Would love to hear some explanations or
ideas about how to do this!

Cheers,
Ed
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Peter Hopfgartner

On 03/14/2012 03:50 AM, Charlie Sharpsteen wrote:

Hello,

I was wondering if anyone has a Personal Package Archive for Ubuntu 
that is tracking the 2.0 beta releases. I looked at the UbuntuGIS and 
Postgis project pages on Launchpad, but the only releases listed there 
were for 1.5.x. Even the unstable repostory of UbuntuGIS was still 
tracking 1.5.x.


-Charlie


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
I packaged the beta2 for RHEL/CentOS 6, but they are completly untested, 
due to a almost complete lack of time.


Peter


--
Peter Hopfgartner
web  : www.r3-gis.com


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Are there any Ubuntu PPAs that serve PostGIS 2.0 beta releases?

2012-03-14 Thread Sandro Santilli
On Tue, Mar 13, 2012 at 07:50:32PM -0700, Charlie Sharpsteen wrote:

> I was wondering if anyone has a Personal Package Archive for Ubuntu that is 
> tracking the 2.0 beta releases. I looked at the UbuntuGIS and Postgis 
> project pages on Launchpad, but the only releases listed there were for 
> 1.5.x. Even the unstable repostory of UbuntuGIS was still tracking 1.5.x.

I'm not aware of any. It'd be very welcome if you want to setup one.

--strk; 

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Simplify a perfect (hierarchical) partition of polygons (ST_SimplifyPreserveTopology and friends)

2012-03-14 Thread Sandro Santilli
On Wed, Mar 14, 2012 at 12:19:41AM +, Martin Tomko wrote:

> - is the hierarchicalTopoGeom somehow explicitly created, or is it just a
> part of topoGeom internal implementation? Can I profit of this hierarhcial
> topological concept directly?

Explicitly created. When you create a layer (AddTopoGeometryColumn) you
specify the id of the "child layer". At that point the element_id you'll
use when constructing the TopoGeometry won't refer to primitive (node,edge,
face) identifiers but rather to TopoGeometry identifiers.

> - If I build a TopoGEom, and run ST_SimplifyPReserveTopology on it, will
> the nodes be respected and the topology preserved in the output (the
> result should be a topogeom...)?

No, this is not yet "magically done". Returning a TopoGeom would be cheating
as a TopoGeom is really a 1:N reference to other objects into the database,
so you have no literal and thus it takes creating or modifying a whole schema
in order to do that (more or less).

I think that returning a simple geometry but using the topological structure
would be a good interface. It'd be then up to you to decide what to do with
the returned simple. It's not implemented yet.

> I think that the best way for this hierarchical scenarios is to start from
> the finest geographies and aggregate upwards on the generalised ones. I
> will have to somehow control for the intermediate nodes that are not valid
> for higher order geometries (joins of suburbs on the state boundary,
> etcŠ), but that I could solve somehow.

Yes, it probably don't make sense to simplify single TopoGeoms in turn if
you know you're going to simplify the whole topology. In that case you would
just make a copy of the topology and then simplify all edges on the copy.
Existing TopoGeometry objects (appropriately re-bound to the new topology)
would magically convert to a simplified version of simple geometries. Both
simple and hierarchical ones.

--strk; 

  ,--o-. 
  |   __/  |Delivering high quality PostGIS 2.0 !
  |  / 2.0 |http://strk.keybit.net - http://vizzuality.com
  `-o--'

___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users