[postgis-users] ST_UNION function severely broken in Postgis 2.0.1

2012-06-25 Thread THX1138
Hello,

I am trying to perform a function similar to ArcGIS erase in postgis where
the geometry of all polygons from one table are erased from all of the
polygons in another.

I have used to the following query to dump all multipart geometries to
single part geometries and repaired any issues. I then attempted to union
them together using a common id, which I would then use perform
st_difference on another layer. 

create table unioned_intersections(id serial primary key,geom_2277
geometry);
insert into unioned_intersections

with geom_dump as (select id,
st_makevalid((st_dump(geom)).geom::geometry(polygon,2277)) geom from
zone_isect)

select id, st_union(st_buffer(geom,0.0)) from geom_dump group by id;

However when I tried this, I received the following flagrant error message:


ERROR:  GEOSUnaryUnion: TopologyException: found non-noded intersection
between LINESTRING (3.11842e+06 1.00741e+07, 3.11842e+06 1.00741e+07) and
LINESTRING (3.11842e+06 1.00741e+07, 3.11843e+06 1.00741e+07) at
3118422.2903139661 10074127.332665939

** Error **

ERROR: GEOSUnaryUnion: TopologyException: found non-noded intersection
between LINESTRING (3.11842e+06 1.00741e+07, 3.11842e+06 1.00741e+07) and
LINESTRING (3.11842e+06 1.00741e+07, 3.11843e+06 1.00741e+07) at
3118422.2903139661 10074127.332665939
SQL state: XX000

Last Friday,I looked this up and determined that it was probably a geos bug
based on this  http://trac.osgeo.org/geos/ticket/527 ticket  , so I went
ahead and dumped my postgis (2.0.0SVN GEOS 3.3.3 GDAL 1.9.0) database built
the most recent versions of all dependencies and reinstalled hoping that
this error would be miraculously fixed and that my soul could be put at ease
by a successfully completed union query. However, I was terribly mistaken
and all morale was lost when the error arose again -completely undaunted by
the new geos release. 

I have no idea what could be wrong as the hundreds of thousands of
geometries in this table were made valid and were all of the multipolygon
type. I also checked for empty non-polygon geometry types, but sadly it had
no effect whatsoever.

Does anyone know of an easy workaround to this or some way of at least
determining which polygons are throwing this error so that I know what
percent of my dataset is susceptible and why?

I ran this function on a few different large datasets and the error showed
up every single time, yet I have never had this error with st_intersection
or any other geoprocessing function.

System Specifications:

"POSTGIS="2.0.1SVN r9761" GEOS="3.4.0dev-CAPI-1.8.0 r3691" PROJ="Rel. 4.8.0,
6 March 2012" GDAL="GDAL 2.0dev, released 2011/12/29" LIBXML="2.7.8"
LIBJSON="UNKNOWN" TOPOLOGY RASTER"

On Postgres 9.1.4 Ubuntu Linux 12.04 64 bit

Thanks,

Andrew


--
View this message in context: 
http://postgis.17.n6.nabble.com/ST-UNION-function-severely-broken-in-Postgis-2-0-1-tp4998600.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Problem using ST_AsRaster

2012-06-25 Thread Mark Wynter
Hi Bborie

As part of a pl/pgsql update process, my requirement is to create a "new" 
raster tile with same alignment (AND upperleftx, upperlefty, block dimensions) 
as the reference raster tile.  For the new tile, I then want to set the pixel 
values  = 100  for those pixels which intersect the "updated" vector polygon.   
 I'm not interested in parts of the vector polygon beyond the extent of the 
reference tile.

The reference raster is:
CREATE TABLE dummy_rast (rid integer, rast raster) WITH (OIDS=FALSE);
INSERT INTO dummy_rast VALUES(1, ST_MakeEmptyRaster(30, 30, 576000, -3780375, 
50, -30, 0, 0, 3577));
UPDATE dummy_rast SET rast =  ST_AddBand(rast, 1, '8BUI', NULL);
SELECT AddRasterConstraints('dummy_rast'::name, 'rast'::name);

As an approach, my initial thoughts were to rasterise the vector layer using 
ST_AsRaster.

From scratch, the vector layer comprises two overlapping polygons which 
protrude beyond the extent of the reference tile...
CREATE TABLE viewshed_vectors (gid integer, geometry geometry(polygon, 3577)) 
WITH (OIDS=FALSE);
INSERT INTO viewshed_vectors VALUES(1, 
ST_Polygon(ST_LineFromWKB(ST_AsBinary(ST_GeomFromText('LINESTRING(576500 
-3780500, 577000 -3780500, 577000 -3781000, 576500 -3781000, 576500 
-3780500)')),3577),3577));
INSERT INTO viewshed_vectors VALUES(2, 
ST_Polygon(ST_LineFromWKB(ST_AsBinary(ST_GeomFromText('LINESTRING(576750 
-3780250, 577250 -3780250, 577250 -3780750, 576750 -3780750, 576750 
-3780250)')),3577),3577));

To rasterise the viewshed_vectors...
CREATE TABLE viewshed_rast AS
WITH vt as (SELECT ST_Union(geometry) as geometry FROM viewshed_vectors)
SELECT rt.rid, ST_AsRaster(vt.geometry, rt.rast, '8BUI', 100, NULL) as rast 
FROM vt, dummy_rast as rt;
SELECT AddRasterConstraints('viewshed_rast'::name, 'rast'::name);

SELECT ST_SameAlignment(rt.rast, vt.rast) as sm FROM dummy_rast as rt, 
viewshed_rast as vt;
sm 

 t

The result when mapped in QGIS is as per this updated screenshot.

Is there another step I must now do using ST_MapAlgebra to burn the 
(intersecting) viewshed_rast values to the underlying dummy_rast tile?   What 
might that expression look like?  

Should I be approaching this a different way?

I appreciate your thoughts and help.

Best regards




> 
> Message: 18
> Date: Mon, 25 Jun 2012 10:39:52 -0700
> From: Bborie Park 
> Subject: Re: [postgis-users] Problem using ST_AsRaster
> To: postgis-users@postgis.refractions.net
> Message-ID: <4fe8a268.6050...@ucdavis.edu>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Hi Mark,
> 
> Can you elaborate on what you mean by "resultant raster does not map to
> the reference raster"?
> 
> The output from ST_AsRaster should result in a raster with the same
> SRID, scale and skew as the reference raster.  The output raster should
> also be aligned with the reference raster as tested by ST_SameAlignment.
> 
> -bborie
> 
> On 06/23/2012 11:04 PM, Mark Wynter wrote:
>> I can rasterise a vector layer, but I'm having trouble mapping it to a 
>> reference raster.
>> 
>> The reference raster, called dummy_rast is a 1x1 raster tile with a height 
>> and width of 500pixels, each of 250m in size.  I created using a pl/pgsql 
>> function:
>> SELECT make_tiled_raster('public', 'dummy_rast', 576000, -378, 1, 1, 
>> 500, 500, 250, -250);
>> The result is 
>> 
>> srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | 
>> pixel_types | nodata_values 
>> --+-+-+-+-+---+-+---
>> 3577 | 250 |-250 | 500 | 500 | 1 | {8BUI}
>>   | {NULL}
>> 
>> 
>> I now wish to burn a vector layer onto this raster:
>> 
>> CREATE TABLE viewshed_rast AS
>> WITH vt as (SELECT ST_Union(geometry) as geometry FROM viewshed_vectors)
>> SELECT rt.rid, ST_AsRaster(vt.geometry, rt.rast, '8BUI', 120, 100) as rast 
>> FROM dummy_rast as rt, vt;
>> 
>> The result is 
>> srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | 
>> pixel_types | nodata_values 
>> --+-+-+-+-+---+-+---
>> 3577 | 250 |-250 |  67 |  38 | 1 | {8BUI}
>>   | {100}
>> (1 row)
>> 
>> I do not understand why the resultant raster does not map to the reference 
>> raster?   Refer screenshot attached showing the resultant layers in QGIS.  
>> The upperleftx and upperlefty, and the block size of the resultant raster 
>> are defined by the extent of the vector layer and not the reference raster.  
>>  
>> 
>> Is there something obvious I'm doing wrong?  Thanks.
>> 
>> ___
>> 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] TopologyException and ST_Intersection

2012-06-25 Thread jdmorgan

Hi Sandro,

Thanks for your reply.  Here is the PostGIS version we are using:  
POSTGIS="1.5.3" GEOS="3.3.1-CAPI-1.7.1" PROJ="Rel. 4.7.1, 23 September 
2009" LIBXML="2.7.6" USE_STATS


Is it easy to upgrade the GEOS or the POSTGIS version for that matter?  
What I mean is it an inplace upgrade?  We are running on a LINUX server 
(CENTOS).


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


Re: [postgis-users] Proper way to upgrade after using CREATE EXTENSION postgis?

2012-06-25 Thread Charlie Sharpsteen
On Monday, June 25, 2012 12:33:06 PM UTC-8, Paragon Corporation wrote:
>
> It worked fine for me upgrading from 2.0.0 to 2.0.1. 
> I used: 
> ALTER EXTENSION postgis UPDATE TO "2.0.1";   
>
> Which version of PostGIS are you using. 
>

 As stated in the first email, I was moving from version 2.0 to 2.0.1.

However, I just re-installed 2.0 to get the output of 
postgis_full_version(). Along the way I updated PostgreSQL from 9.1.3 to 
9.1.4 and then re-tried the 2.0.1 upgrade.

This time ALTER EXTENSION worked without complaint. Perhaps there was a bug 
in Postgres that got fixed by the 9.1.4 upgrade.

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


Re: [postgis-users] Finding highest cell value in raster using ST_Value

2012-06-25 Thread Pierre Racine
But try

SELECT ST_Centroid((ST_PixelAsPolygons(ST_Reclass(rast))).geom)
FROM yourRaster

and let us know the difference in terms of performance... You could be 
surprised!

Pierre

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of e.j.h.polle
> Sent: Monday, June 25, 2012 5:34 PM
> To: postgis-us...@googlegroups.com
> Cc: PostGIS Users Discussion
> Subject: Re: [postgis-users] Finding highest cell value in raster using 
> ST_Value
> 
> Hi Bborie, Pierre,
> 
> 
> Thanks for adding the ticket. (http://trac.osgeo.org/postgis/ticket/1889)
> 
> And I guess I am looking forward to PostGIS 2.1 then :-) (But I am still a 
> little
> proud of my 'round-about way' to locate the cell with the highest value...)
> 
> Cheers,
> 
> 
> Egge-Jan
> 
> 
> Op maandag 25 juni 2012 21:39:29 UTC+1 schreef Bborie Park het volgende:
> 
>   Too many columns.  I was thinking that this is better served in a
>   separate function as that value could be repeated.  I'm adding a ticket
>   for that separate function.
> 
>   On 06/25/2012 01:36 PM, Pierre Racine wrote:
>   > Good find Bborie!
>   >
>   > I would add that we should fill a ticket like "ST_Summary should 
> report
> the x and y raster coordinates of the max and the min". So four new columns...
>   >
>   > Pierre
>   >
>   >> -Original Message-
>   >> From: postgis-users-boun...@postgis.refractions.net
>   [mailto:postgis-users-
>   >> boun...@postgis.refractions.net
>  ] On Behalf Of Bborie Park
>   >> Sent: Monday, June 25, 2012 4:32 PM
>   >> To: postgis-users@postgis.refractions.net  us...@postgis.refractions.net>
>   >> Subject: Re: [postgis-users] Finding highest cell value in raster 
> using
> ST_Value
>   >>
>   >> Egge-Jan,
>   >>
>   >> That is an intriguing question with no clean/simple solution.  The
>   >> fastest approach may be to call ST_Reclass() to create a 1BB mask
> based
>   >> upon that value and the pass the resulting raster to
>   >> ST_PixelAsPolygons() which will give you what you want.
>   >>
>   >> Yes, the above is a round-about way to do this.  This is something 
> I'll
>   >> (ST_PixelofValue?) see about adding for PostGIS 2.1.
>   >>
>   >> -bborie
>   >>
>   >> On 06/25/2012 01:16 PM, e.j.h.polle wrote:
>   >>> Hi,
>   >>>
>   >>> OK - with ST_SummaryStats it is easy to retrieve the highest value 
> in
> the
>   >>> raster, but then I only have this value. Now I want to retrieve
>   >>> (information about) the cell/pixel having this value, to be able to
>   >>> visualize the highest point on the map. My original query (see first
> post)
>   >>> does give me this information (after 45 seconds...).
>   >>>
>   >>> How would I go about to get hold of the pixel with the highest
> value,
>   >>> knowing this value?
>   >>>
>   >>> Cheers,
>   >>>
>   >>> Egge-Jan
>   >>>
>   >>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>   
>    Why don't you use ST_SummaryStats instead ST_Value? That way
> you can get
>    easily any basic stat, included the maximum value of the raster. It
> would
>    be
>    something like:
>   
>    SELECT (ST_SummaryStats(rast)).max FROM raster_table;
>   
>    --
>    View this message in context:
>    http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-
> raster-using-  raster-using->
>   >> ST-Value-tp4998545p4998554.html
>    Sent from the PostGIS - User mailing list archive at Nabble.com.
>    ___
>    postgis-users mailing list
>    postgis-users@postgis.refractions.net  us...@postgis.refractions.net>
>    http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
>   
>   >>>
>   >>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>   
>    Why don't you use ST_SummaryStats instead ST_Value? That way
> you can get
>    easily any basic stat, included the maximum value of the raster. It
> would
>    be
>    something like:
>   
>    SELECT (ST_SummaryStats(rast)).max FROM raster_table;
>   
>    --
>    View this message in context:
>    http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-
> raster-using-  raster-using->
>   >> ST-Value-tp4998545p4998554.html
>    Sent from 

Re: [postgis-users] Finding highest cell value in raster using ST_Value

2012-06-25 Thread e.j.h.polle
Hi Bborie, Pierre,


Thanks for adding the ticket. (http://trac.osgeo.org/postgis/ticket/1889)

And I guess I am looking forward to PostGIS 2.1 then :-) (But I am still a 
little proud of my 'round-about way' to locate the cell with the highest 
value...)

Cheers,


Egge-Jan


Op maandag 25 juni 2012 21:39:29 UTC+1 schreef Bborie Park het volgende:
>
> Too many columns.  I was thinking that this is better served in a 
> separate function as that value could be repeated.  I'm adding a ticket 
> for that separate function. 
>
> On 06/25/2012 01:36 PM, Pierre Racine wrote: 
> > Good find Bborie! 
> > 
> > I would add that we should fill a ticket like "ST_Summary should report 
> the x and y raster coordinates of the max and the min". So four new 
> columns... 
> > 
> > Pierre 
> > 
> >> -Original Message- 
> >> From: postgis-users-boun...@postgis.refractions.net [mailto:
> postgis-users- 
> >> boun...@postgis.refractions.net] On Behalf Of Bborie Park 
> >> Sent: Monday, June 25, 2012 4:32 PM 
> >> To: postgis-users@postgis.refractions.net 
> >> Subject: Re: [postgis-users] Finding highest cell value in raster using 
> ST_Value 
> >> 
> >> Egge-Jan, 
> >> 
> >> That is an intriguing question with no clean/simple solution.  The 
> >> fastest approach may be to call ST_Reclass() to create a 1BB mask based 
> >> upon that value and the pass the resulting raster to 
> >> ST_PixelAsPolygons() which will give you what you want. 
> >> 
> >> Yes, the above is a round-about way to do this.  This is something I'll 
> >> (ST_PixelofValue?) see about adding for PostGIS 2.1. 
> >> 
> >> -bborie 
> >> 
> >> On 06/25/2012 01:16 PM, e.j.h.polle wrote: 
> >>> Hi, 
> >>> 
> >>> OK - with ST_SummaryStats it is easy to retrieve the highest value in 
> the 
> >>> raster, but then I only have this value. Now I want to retrieve 
> >>> (information about) the cell/pixel having this value, to be able to 
> >>> visualize the highest point on the map. My original query (see first 
> post) 
> >>> does give me this information (after 45 seconds...). 
> >>> 
> >>> How would I go about to get hold of the pixel with the highest value, 
> >>> knowing this value? 
> >>> 
> >>> Cheers, 
> >>> 
> >>> Egge-Jan 
> >>> 
> >>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote: 
>  
>  Why don't you use ST_SummaryStats instead ST_Value? That way you can 
> get 
>  easily any basic stat, included the maximum value of the raster. It 
> would 
>  be 
>  something like: 
>  
>  SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>  
>  -- 
>  View this message in context: 
>  
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using- 
> >> ST-Value-tp4998545p4998554.html 
>  Sent from the PostGIS - User mailing list archive at Nabble.com. 
>  ___ 
>  postgis-users mailing list 
>  postgis-users@postgis.refractions.net 
>  http://postgis.refractions.net/mailman/listinfo/postgis-users 
>  
> >>> 
> >>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote: 
>  
>  Why don't you use ST_SummaryStats instead ST_Value? That way you can 
> get 
>  easily any basic stat, included the maximum value of the raster. It 
> would 
>  be 
>  something like: 
>  
>  SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>  
>  -- 
>  View this message in context: 
>  
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using- 
> >> ST-Value-tp4998545p4998554.html 
>  Sent from the PostGIS - User mailing list archive at Nabble.com. 
>  ___ 
>  postgis-users mailing list 
>  postgis-users@postgis.refractions.net 
>  http://postgis.refractions.net/mailman/listinfo/postgis-users 
>  
> >>> 
> >>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote: 
>  
>  Why don't you use ST_SummaryStats instead ST_Value? That way you can 
> get 
>  easily any basic stat, included the maximum value of the raster. It 
> would 
>  be 
>  something like: 
>  
>  SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>  
>  -- 
>  View this message in context: 
>  
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using- 
> >> ST-Value-tp4998545p4998554.html 
>  Sent from the PostGIS - User mailing list archive at Nabble.com. 
>  ___ 
>  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 
> >> 
> >> -- 
> >> Bborie Park 
> >> Programmer 
> >> Center for Vectorborne Disease

Re: [postgis-users] Finding highest cell value in raster using ST_Value

2012-06-25 Thread Bborie Park
Too many columns.  I was thinking that this is better served in a
separate function as that value could be repeated.  I'm adding a ticket
for that separate function.

On 06/25/2012 01:36 PM, Pierre Racine wrote:
> Good find Bborie!
> 
> I would add that we should fill a ticket like "ST_Summary should report the x 
> and y raster coordinates of the max and the min". So four new columns...
> 
> Pierre
> 
>> -Original Message-
>> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
>> boun...@postgis.refractions.net] On Behalf Of Bborie Park
>> Sent: Monday, June 25, 2012 4:32 PM
>> To: postgis-users@postgis.refractions.net
>> Subject: Re: [postgis-users] Finding highest cell value in raster using 
>> ST_Value
>>
>> Egge-Jan,
>>
>> That is an intriguing question with no clean/simple solution.  The
>> fastest approach may be to call ST_Reclass() to create a 1BB mask based
>> upon that value and the pass the resulting raster to
>> ST_PixelAsPolygons() which will give you what you want.
>>
>> Yes, the above is a round-about way to do this.  This is something I'll
>> (ST_PixelofValue?) see about adding for PostGIS 2.1.
>>
>> -bborie
>>
>> On 06/25/2012 01:16 PM, e.j.h.polle wrote:
>>> Hi,
>>>
>>> OK - with ST_SummaryStats it is easy to retrieve the highest value in the
>>> raster, but then I only have this value. Now I want to retrieve
>>> (information about) the cell/pixel having this value, to be able to
>>> visualize the highest point on the map. My original query (see first post)
>>> does give me this information (after 45 seconds...).
>>>
>>> How would I go about to get hold of the pixel with the highest value,
>>> knowing this value?
>>>
>>> Cheers,
>>>
>>> Egge-Jan
>>>
>>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:

 Why don't you use ST_SummaryStats instead ST_Value? That way you can get
 easily any basic stat, included the maximum value of the raster. It would
 be
 something like:

 SELECT (ST_SummaryStats(rast)).max FROM raster_table;

 --
 View this message in context:
 http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-
>> ST-Value-tp4998545p4998554.html
 Sent from the PostGIS - User mailing list archive at Nabble.com.
 ___
 postgis-users mailing list
 postgis-users@postgis.refractions.net
 http://postgis.refractions.net/mailman/listinfo/postgis-users

>>>
>>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:

 Why don't you use ST_SummaryStats instead ST_Value? That way you can get
 easily any basic stat, included the maximum value of the raster. It would
 be
 something like:

 SELECT (ST_SummaryStats(rast)).max FROM raster_table;

 --
 View this message in context:
 http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-
>> ST-Value-tp4998545p4998554.html
 Sent from the PostGIS - User mailing list archive at Nabble.com.
 ___
 postgis-users mailing list
 postgis-users@postgis.refractions.net
 http://postgis.refractions.net/mailman/listinfo/postgis-users

>>>
>>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:

 Why don't you use ST_SummaryStats instead ST_Value? That way you can get
 easily any basic stat, included the maximum value of the raster. It would
 be
 something like:

 SELECT (ST_SummaryStats(rast)).max FROM raster_table;

 --
 View this message in context:
 http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-
>> ST-Value-tp4998545p4998554.html
 Sent from the PostGIS - User mailing list archive at Nabble.com.
 ___
 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
>>
>> --
>> 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
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 

-- 
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] Finding highest cell value in raster using ST_Value

2012-06-25 Thread Pierre Racine
Good find Bborie!

I would add that we should fill a ticket like "ST_Summary should report the x 
and y raster coordinates of the max and the min". So four new columns...

Pierre

> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of Bborie Park
> Sent: Monday, June 25, 2012 4:32 PM
> To: postgis-users@postgis.refractions.net
> Subject: Re: [postgis-users] Finding highest cell value in raster using 
> ST_Value
> 
> Egge-Jan,
> 
> That is an intriguing question with no clean/simple solution.  The
> fastest approach may be to call ST_Reclass() to create a 1BB mask based
> upon that value and the pass the resulting raster to
> ST_PixelAsPolygons() which will give you what you want.
> 
> Yes, the above is a round-about way to do this.  This is something I'll
> (ST_PixelofValue?) see about adding for PostGIS 2.1.
> 
> -bborie
> 
> On 06/25/2012 01:16 PM, e.j.h.polle wrote:
> > Hi,
> >
> > OK - with ST_SummaryStats it is easy to retrieve the highest value in the
> > raster, but then I only have this value. Now I want to retrieve
> > (information about) the cell/pixel having this value, to be able to
> > visualize the highest point on the map. My original query (see first post)
> > does give me this information (after 45 seconds...).
> >
> > How would I go about to get hold of the pixel with the highest value,
> > knowing this value?
> >
> > Cheers,
> >
> > Egge-Jan
> >
> > On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
> >>
> >> Why don't you use ST_SummaryStats instead ST_Value? That way you can get
> >> easily any basic stat, included the maximum value of the raster. It would
> >> be
> >> something like:
> >>
> >> SELECT (ST_SummaryStats(rast)).max FROM raster_table;
> >>
> >> --
> >> View this message in context:
> >> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-
> ST-Value-tp4998545p4998554.html
> >> Sent from the PostGIS - User mailing list archive at Nabble.com.
> >> ___
> >> postgis-users mailing list
> >> postgis-users@postgis.refractions.net
> >> http://postgis.refractions.net/mailman/listinfo/postgis-users
> >>
> >
> > On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
> >>
> >> Why don't you use ST_SummaryStats instead ST_Value? That way you can get
> >> easily any basic stat, included the maximum value of the raster. It would
> >> be
> >> something like:
> >>
> >> SELECT (ST_SummaryStats(rast)).max FROM raster_table;
> >>
> >> --
> >> View this message in context:
> >> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-
> ST-Value-tp4998545p4998554.html
> >> Sent from the PostGIS - User mailing list archive at Nabble.com.
> >> ___
> >> postgis-users mailing list
> >> postgis-users@postgis.refractions.net
> >> http://postgis.refractions.net/mailman/listinfo/postgis-users
> >>
> >
> > On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
> >>
> >> Why don't you use ST_SummaryStats instead ST_Value? That way you can get
> >> easily any basic stat, included the maximum value of the raster. It would
> >> be
> >> something like:
> >>
> >> SELECT (ST_SummaryStats(rast)).max FROM raster_table;
> >>
> >> --
> >> View this message in context:
> >> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-
> ST-Value-tp4998545p4998554.html
> >> Sent from the PostGIS - User mailing list archive at Nabble.com.
> >> ___
> >> 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
> 
> --
> 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
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Proper way to upgrade after using CREATE EXTENSION postgis?

2012-06-25 Thread Paragon Corporation
It worked fine for me upgrading from 2.0.0 to 2.0.1.
I used:
ALTER EXTENSION postgis UPDATE TO "2.0.1";   

Which version of PostGIS are you using.

do a 

SELECT postgis_full_version()l

When all fails, to fix your database.

1) Backup your database
2) Restore it.

It should automatically upgrade itself to the new version.



Hope that helps,
Regina
http://www.postgis.us




> -Original Message-
> From: postgis-users-boun...@postgis.refractions.net 
> [mailto:postgis-users-boun...@postgis.refractions.net] On 
> Behalf Of Sandro Santilli
> Sent: Monday, June 25, 2012 3:09 PM
> To: PostGIS Users Discussion
> Cc: postgis-us...@googlegroups.com
> Subject: Re: [postgis-users] Proper way to upgrade after 
> using CREATE EXTENSION postgis?
> 
> On Mon, Jun 25, 2012 at 11:02:44AM -0700, Charlie Sharpsteen wrote:
> > Hello all,
> > 
> > I installed PostGIS 2.0 and added it to a database using:
> > 
> > CREATE EXTENSION postgis;
> > 
> > 
> > Today, I built and installed 2.0.1 and tried to upgrade the 
> extension using:
> > 
> > ALTER EXTENSION postgis UPDATE;
> > 
> > 
> > However, this failed with:
> > 
> > ERROR:  cannot drop cast from geometry to geometry because 
> > extension postgis requires it
> > HINT:  You can drop extension postgis instead.
> > 
> > 
> > So, I tried the old school way of running the upgrade scripts:
> > 
> > psql -f /usr/local/share/postgis/postgis_upgrade_20_minor.sql
> > hum_bay_gis
> > 
> > 
> > But this also fails:
> > 
> > 
> > BEGIN
> > CREATE FUNCTION
> >postgis_major_version_check
> > --
> >  Scripts versions checked for upgrade: ok
> > (1 row)
> > 
> > DROP FUNCTION
> > 
> psql:/usr/local/share/postgis/postgis_upgrade_20_minor.sql:46: ERROR: 
> >  cannot drop function addgeometrycolumn(character varying,character 
> > varying,character varying,character varying,integer,character
> > varying,integer,boolean) because extension postgis requires it
> > HINT:  You can drop extension postgis instead.
> > 
> psql:/usr/local/share/postgis/postgis_upgrade_20_minor.sql:47: ERROR: 
> >  current transaction is aborted, commands ignored until end of 
> > transaction block ...(thousands of similar errors)...
> > ROLLBACK
> > 
> > 
> > So, it appears there is no way to upgrade PostGIS without 
> running `DROP 
> > EXTENSION postgis` which would cascade to all 
> spatially-enabled tables.
> > 
> > Am I missing a step or is there a circular dependency here 
> that is breaking 
> > the upgrade process?
> 
> I had a similar experience with EXTENSION, so much that I 
> decided not to
> use it again. It's a bad step back from safe and well-tested 
> old school way.
> 
> I hope you've a way to break out of the EXTENSION dependency 
> jail somehow.
> Please report back when you figure.
> 
> --strk;
> 
>  Sent from our free software
>  http://www.gnu.org/philosophy/free-sw.html
> ___
> 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] Finding highest cell value in raster using ST_Value

2012-06-25 Thread Bborie Park
Egge-Jan,

That is an intriguing question with no clean/simple solution.  The
fastest approach may be to call ST_Reclass() to create a 1BB mask based
upon that value and the pass the resulting raster to
ST_PixelAsPolygons() which will give you what you want.

Yes, the above is a round-about way to do this.  This is something I'll
(ST_PixelofValue?) see about adding for PostGIS 2.1.

-bborie

On 06/25/2012 01:16 PM, e.j.h.polle wrote:
> Hi,
> 
> OK - with ST_SummaryStats it is easy to retrieve the highest value in the 
> raster, but then I only have this value. Now I want to retrieve 
> (information about) the cell/pixel having this value, to be able to 
> visualize the highest point on the map. My original query (see first post) 
> does give me this information (after 45 seconds...).
> 
> How would I go about to get hold of the pixel with the highest value, 
> knowing this value?
> 
> Cheers,
> 
> Egge-Jan
> 
> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>>
>> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
>> easily any basic stat, included the maximum value of the raster. It would 
>> be 
>> something like: 
>>
>> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>>
>> -- 
>> View this message in context: 
>> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html
>>  
>> Sent from the PostGIS - User mailing list archive at Nabble.com. 
>> ___ 
>> postgis-users mailing list 
>> postgis-users@postgis.refractions.net 
>> http://postgis.refractions.net/mailman/listinfo/postgis-users 
>>
> 
> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>>
>> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
>> easily any basic stat, included the maximum value of the raster. It would 
>> be 
>> something like: 
>>
>> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>>
>> -- 
>> View this message in context: 
>> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html
>>  
>> Sent from the PostGIS - User mailing list archive at Nabble.com. 
>> ___ 
>> postgis-users mailing list 
>> postgis-users@postgis.refractions.net 
>> http://postgis.refractions.net/mailman/listinfo/postgis-users 
>>
> 
> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>>
>> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
>> easily any basic stat, included the maximum value of the raster. It would 
>> be 
>> something like: 
>>
>> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>>
>> -- 
>> View this message in context: 
>> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html
>>  
>> Sent from the PostGIS - User mailing list archive at Nabble.com. 
>> ___ 
>> 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

-- 
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] Finding highest cell value in raster using ST_Value

2012-06-25 Thread e.j.h.polle
Hi,

OK - with ST_SummaryStats it is easy to retrieve the highest value in the 
raster, but then I only have this value. Now I want to retrieve 
(information about) the cell/pixel having this value, to be able to 
visualize the highest point on the map. My original query (see first post) 
does give me this information (after 45 seconds...).

How would I go about to get hold of the pixel with the highest value, 
knowing this value?

Cheers,

Egge-Jan

On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>
> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
> easily any basic stat, included the maximum value of the raster. It would 
> be 
> something like: 
>
> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>
> -- 
> View this message in context: 
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html
>  
> Sent from the PostGIS - User mailing list archive at Nabble.com. 
> ___ 
> postgis-users mailing list 
> postgis-users@postgis.refractions.net 
> http://postgis.refractions.net/mailman/listinfo/postgis-users 
>

On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>
> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
> easily any basic stat, included the maximum value of the raster. It would 
> be 
> something like: 
>
> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>
> -- 
> View this message in context: 
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html
>  
> Sent from the PostGIS - User mailing list archive at Nabble.com. 
> ___ 
> postgis-users mailing list 
> postgis-users@postgis.refractions.net 
> http://postgis.refractions.net/mailman/listinfo/postgis-users 
>

On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>
> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
> easily any basic stat, included the maximum value of the raster. It would 
> be 
> something like: 
>
> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>
> -- 
> View this message in context: 
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html
>  
> Sent from the PostGIS - User mailing list archive at Nabble.com. 
> ___ 
> 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] Proper way to upgrade after using CREATE EXTENSION postgis?

2012-06-25 Thread Sandro Santilli
On Mon, Jun 25, 2012 at 11:02:44AM -0700, Charlie Sharpsteen wrote:
> Hello all,
> 
> I installed PostGIS 2.0 and added it to a database using:
> 
> CREATE EXTENSION postgis;
> 
> 
> Today, I built and installed 2.0.1 and tried to upgrade the extension using:
> 
> ALTER EXTENSION postgis UPDATE;
> 
> 
> However, this failed with:
> 
> ERROR:  cannot drop cast from geometry to geometry because extension 
> postgis requires it
> HINT:  You can drop extension postgis instead.
> 
> 
> So, I tried the old school way of running the upgrade scripts:
> 
> psql -f /usr/local/share/postgis/postgis_upgrade_20_minor.sql 
> hum_bay_gis
> 
> 
> But this also fails:
> 
> 
> BEGIN
> CREATE FUNCTION
>postgis_major_version_check
> --
>  Scripts versions checked for upgrade: ok
> (1 row)
> 
> DROP FUNCTION
> psql:/usr/local/share/postgis/postgis_upgrade_20_minor.sql:46: ERROR: 
>  cannot drop function addgeometrycolumn(character varying,character 
> varying,character varying,character varying,integer,character 
> varying,integer,boolean) because extension postgis requires it
> HINT:  You can drop extension postgis instead.
> psql:/usr/local/share/postgis/postgis_upgrade_20_minor.sql:47: ERROR: 
>  current transaction is aborted, commands ignored until end of transaction 
> block
> ...(thousands of similar errors)...
> ROLLBACK
> 
> 
> So, it appears there is no way to upgrade PostGIS without running `DROP 
> EXTENSION postgis` which would cascade to all spatially-enabled tables.
> 
> Am I missing a step or is there a circular dependency here that is breaking 
> the upgrade process?

I had a similar experience with EXTENSION, so much that I decided not to
use it again. It's a bad step back from safe and well-tested old school way.

I hope you've a way to break out of the EXTENSION dependency jail somehow.
Please report back when you figure.

--strk;

 Sent from our free software
 http://www.gnu.org/philosophy/free-sw.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] TopologyException and ST_Intersection

2012-06-25 Thread Sandro Santilli
On Mon, Jun 25, 2012 at 01:47:22PM -0400, jdmorgan wrote:
> 
> This is awesome feedback and I really appreciate it as I am new to
> PostGIS.  However, I still get the following after creating new
> populated tables via the st_buffer(geom, 0.0) or the
> st_buffer(st_buffer(geom, -1), 1).  Any other ideas?
> 
> NOTICE:  TopologyException: side location conflict at 1.66342e+06
> 1.99261e+06
> ERROR:  GEOS overlaps() threw an error!

Which version of GEOS do you have ? SELECT postgis_full_version();

Try upgrading to latest (3.3.5) 
If it still fails consider reducing the input pair till it's small
enough to be attached as HEXWKB to a ticket.

As a workaround you could try shaking the vertices with something
like ST_SnapToGrid (and maybe ST_UnaryUnion on the result to ensure
validity on collapse).

--strk;

 Sent from our free software
 http://www.gnu.org/philosophy/free-sw.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] TopologyException and ST_Intersection

2012-06-25 Thread Sandro Santilli
On Mon, Jun 25, 2012 at 09:15:21AM -0700, Bob and Deb wrote:
> People should be cautioned that some polygons might disappear when using a
> buffer of 0.  Does Postgis 2.0 have this problem with makevalid?

No, ST_MakeValid retains all vertices.

--strk;

 Sent from our free software
 http://www.gnu.org/philosophy/free-sw.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Proper way to upgrade after using CREATE EXTENSION postgis?

2012-06-25 Thread Charlie Sharpsteen
Hello all,

I installed PostGIS 2.0 and added it to a database using:

CREATE EXTENSION postgis;


Today, I built and installed 2.0.1 and tried to upgrade the extension using:

ALTER EXTENSION postgis UPDATE;


However, this failed with:

ERROR:  cannot drop cast from geometry to geometry because extension 
postgis requires it
HINT:  You can drop extension postgis instead.


So, I tried the old school way of running the upgrade scripts:

psql -f /usr/local/share/postgis/postgis_upgrade_20_minor.sql 
hum_bay_gis


But this also fails:


BEGIN
CREATE FUNCTION
   postgis_major_version_check
--
 Scripts versions checked for upgrade: ok
(1 row)

DROP FUNCTION
psql:/usr/local/share/postgis/postgis_upgrade_20_minor.sql:46: ERROR: 
 cannot drop function addgeometrycolumn(character varying,character 
varying,character varying,character varying,integer,character 
varying,integer,boolean) because extension postgis requires it
HINT:  You can drop extension postgis instead.
psql:/usr/local/share/postgis/postgis_upgrade_20_minor.sql:47: ERROR: 
 current transaction is aborted, commands ignored until end of transaction 
block
...(thousands of similar errors)...
ROLLBACK


So, it appears there is no way to upgrade PostGIS without running `DROP 
EXTENSION postgis` which would cascade to all spatially-enabled tables.

Am I missing a step or is there a circular dependency here that is breaking 
the upgrade process?


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


Re: [postgis-users] TopologyException and ST_Intersection

2012-06-25 Thread jdmorgan

Nicolas,


This is awesome feedback and I really appreciate it as I am new to 
PostGIS.  However, I still get the following after creating new 
populated tables via the st_buffer(geom, 0.0) or the 
st_buffer(st_buffer(geom, -1), 1).  Any other ideas?



NOTICE:  TopologyException: side location conflict at 1.66342e+06 
1.99261e+06

ERROR:  GEOS overlaps() threw an error!


Cheers,
Derek


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


Re: [postgis-users] Problem using ST_AsRaster

2012-06-25 Thread Bborie Park
Hi Mark,

Can you elaborate on what you mean by "resultant raster does not map to
the reference raster"?

The output from ST_AsRaster should result in a raster with the same
SRID, scale and skew as the reference raster.  The output raster should
also be aligned with the reference raster as tested by ST_SameAlignment.

-bborie

On 06/23/2012 11:04 PM, Mark Wynter wrote:
> I can rasterise a vector layer, but I'm having trouble mapping it to a 
> reference raster.
> 
> The reference raster, called dummy_rast is a 1x1 raster tile with a height 
> and width of 500pixels, each of 250m in size.  I created using a pl/pgsql 
> function:
> SELECT make_tiled_raster('public', 'dummy_rast', 576000, -378, 1, 1, 500, 
> 500, 250, -250);
> The result is 
>  
>  srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | 
> pixel_types | nodata_values 
> --+-+-+-+-+---+-+---
>  3577 | 250 |-250 | 500 | 500 | 1 | {8BUI}
>   | {NULL}
> 
> 
> I now wish to burn a vector layer onto this raster:
> 
> CREATE TABLE viewshed_rast AS
> WITH vt as (SELECT ST_Union(geometry) as geometry FROM viewshed_vectors)
> SELECT rt.rid, ST_AsRaster(vt.geometry, rt.rast, '8BUI', 120, 100) as rast 
> FROM dummy_rast as rt, vt;
> 
> The result is 
> srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | 
> pixel_types | nodata_values 
> --+-+-+-+-+---+-+---
>  3577 | 250 |-250 |  67 |  38 | 1 | {8BUI}
>   | {100}
> (1 row)
> 
> I do not understand why the resultant raster does not map to the reference 
> raster?   Refer screenshot attached showing the resultant layers in QGIS.  
> The upperleftx and upperlefty, and the block size of the resultant raster are 
> defined by the extent of the vector layer and not the reference raster.   
> 
> Is there something obvious I'm doing wrong?  Thanks.
> 
> 
> 
> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 
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] TopologyException and ST_Intersection

2012-06-25 Thread Bob and Deb
People should be cautioned that some polygons might disappear when using a
buffer of 0.  Does Postgis 2.0 have this problem with makevalid?
On Jun 25, 2012 7:47 AM, "Nicolas Ribot"  wrote:

> > Hi Nicolas,
> > This is great.  However, we are running POSTGIS="1.5.3"  Is this
> possible in
> > this version?  If not, is there a workaround as I don't think we will be
> > able to upgrade that quickely?
> >
> >
>
> Hi Derek
>
> Yes indeed, there is a trick on postgis < 2.0 to clean polygons: try
> using st_buffer(geom, 0.0). This method is often able to rebuild a
> valid polygon from an invalid one. I also saw on the list (and tested
> myself) that st_buffer(st_buffer(geom, -1), 1) could clean some
> polygons that are not cleaned with only a 0 unit buffer.
>
> Nicolas
> ___
> 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] Error adding raster support

2012-06-25 Thread Bborie Park
Hey Luis,

What happens when you run "gdalinfo" or "gdal_translate" without any
parameters?  I'm expecting an error message indicating that GDAL can't
find some library.

I'm guessing that the GDAL library can't find the libraries it was
compiled against.  If you run "ldd" on libgdal.so.1 and still get the
"not found" messages, you'll want to check your GDAL build.

-bborie

On Mon, Jun 25, 2012 at 12:38 AM, Luis  wrote:
> Hi Bborie, here it is:
>
> $ ldd /home/weastflows/temp/postgis-2.0.0/raster/rt_pg/rtpostgis-2.0.so
>        linux-vdso.so.1 =>  (0x7fffb8c98000)
>        libgdal.so.1 => /usr/local/lib/libgdal.so.1 (0x7fde9a573000)
>        libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0x7fde9a34e000)
>        libc.so.6 => /lib/libc.so.6 (0x7fde99fca000)
>        libgeos-3.3.4.so => /usr/local/lib/libgeos-3.3.4.so 
> (0x7fde99c29000)
>        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x7fdec000)
>        libodbc.so.1 => not found
>        libodbcinst.so.1 => not found
>        libxerces-c.so.28 => not found
>        libjasper.so.1 => not found
>        libnetcdf.so.4 => not found
>        libhdf5.so.6 => not found
>        libmfhdfalt.so.0 => not found
>        libdfalt.so.0 => not found
>        libgif.so.4 => not found
>        libjpeg.so.62 => not found
>        libpng12.so.0 => /lib/libpng12.so.0 (0x7fde99771000)
>        libpq.so.5 => /usr/lib/libpq.so.5 (0x7fde99544000)
>        libz.so.1 => /lib/libz.so.1 (0x7fde9932c000)
>        libpthread.so.0 => /lib/libpthread.so.0 (0x7fde9910f000)
>        librt.so.1 => /lib/librt.so.1 (0x7fde98f07000)
>        libdl.so.2 => /lib/libdl.so.2 (0x7fde98d02000)
>        libcurl-gnutls.so.4 => /usr/lib/libcurl-gnutls.so.4 
> (0x7fde98abf000)
>        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fde987ab000)
>        libm.so.6 => /lib/libm.so.6 (0x7fde98527000)
>        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x7fde9831)
>        /lib64/ld-linux-x86-64.so.2 (0x7fde9b549000)
>        libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x7fde980bd000)
>        libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x7fde97d2c000)
>        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x7fde97a68000)
>        libcom_err.so.2 => /lib/libcom_err.so.2 (0x7fde97863000)
>        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 
> (0x7fde9762f000)
>        libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x7fde973e3000)
>        libidn.so.11 => /usr/lib/libidn.so.11 (0x7fde971af000)
>        liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x7fde96fa1000)
>        libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x7fde96cff000)
>        libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x7fde96a86000)
>        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x7fde9686)
>        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 
> (0x7fde96657000)
>        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x7fde96454000)
>        libresolv.so.2 => /lib/libresolv.so.2 (0x7fde9623b000)
>        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x7fde9602)
>        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x7fde95e0f000)
>        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x7fde95c0b000)
>
> Thanks for answering.
>
> --
> View this message in context: 
> http://postgis.17.n6.nabble.com/Error-adding-raster-support-tp4998034p4998559.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



-- 
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] GEOS 3.3.5 released

2012-06-25 Thread Sandro Santilli
On Mon, Jun 25, 2012 at 03:18:59PM +0200, Stefano Iacovella wrote:
> 2012/6/25 Sandro Santilli :
> > Due to an error in versioning of the C library shipped with GEOS-3.3.4
> > (which was inferior to the version of the one shipped with GEOS-3.3.3)
> > those one upgrading from 3.3.3 to 3.3.4 will have an hard time doing so.
> >
> > To simplify things a new 3.3.5 release is out.
> > Just install the new one and things should automatically work.
> >
> > Download link:
> >  http://download.osgeo.org/geos/geos-3.3.5.tar.bz2
> 
> I am not sure this is the best mailing list to write.
> I downloaded the archive and unpacked it.
> 
> ./configure
> stefano@ubuntu1204vm:~/sources/geos-3.3.5$ ./configure
> configure: error: cannot find install-sh, install.sh, or shtool in "."
> "./.." "./../.."

Yep, the package was corrupted.
Re-download please, MD5 sum for the right one: 2ba61afb7fe2c5ddf642d82d7b16e75b

--strk; 

 Sent from our free software
 http://www.gnu.org/philosophy/free-sw.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] TopologyException and ST_Intersection

2012-06-25 Thread Nicolas Ribot
> Hi Nicolas,
> This is great.  However, we are running POSTGIS="1.5.3"  Is this possible in
> this version?  If not, is there a workaround as I don't think we will be
> able to upgrade that quickely?
>
>

Hi Derek

Yes indeed, there is a trick on postgis < 2.0 to clean polygons: try
using st_buffer(geom, 0.0). This method is often able to rebuild a
valid polygon from an invalid one. I also saw on the list (and tested
myself) that st_buffer(st_buffer(geom, -1), 1) could clean some
polygons that are not cleaned with only a 0 unit buffer.

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


Re: [postgis-users] GEOS 3.3.5 released

2012-06-25 Thread Sandro Santilli
False start, the package was corrupted [1].
A working package is now online at the same URL
with MD5 sum 2ba61afb7fe2c5ddf642d82d7b16e75b

Sorry for the inconvenience.

[1] http://trac.osgeo.org/geos/ticket/562

--strk;


On Mon, Jun 25, 2012 at 01:54:06PM +0200, Sandro Santilli wrote:
> Due to an error in versioning of the C library shipped with GEOS-3.3.4
> (which was inferior to the version of the one shipped with GEOS-3.3.3)
> those one upgrading from 3.3.3 to 3.3.4 will have an hard time doing so.
> 
> To simplify things a new 3.3.5 release is out.
> Just install the new one and things should automatically work.
> 
> Download link:
>  http://download.osgeo.org/geos/geos-3.3.5.tar.bz2
> 
> Changes:
>  http://trac.osgeo.org/geos/browser/tags/3.3.5/NEWS
> 
> MD5 sum of the tarball:
>  e372dd5065b29f99febc7b0c03fce9cf
> 
> --strk;
> 
>  Sent from our free software
>  http://www.gnu.org/philosophy/free-sw.html

-- 

 Sent from our free software
 http://www.gnu.org/philosophy/free-sw.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] TopologyException and ST_Intersection

2012-06-25 Thread jdmorgan

Hi Nicolas,
This is great.  However, we are running POSTGIS="1.5.3"  Is this 
possible in this version?  If not, is there a workaround as I don't 
think we will be able to upgrade that quickely?


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


Re: [postgis-users] GEOS 3.3.5 released

2012-06-25 Thread Stefano Iacovella
2012/6/25 Sandro Santilli :
> Due to an error in versioning of the C library shipped with GEOS-3.3.4
> (which was inferior to the version of the one shipped with GEOS-3.3.3)
> those one upgrading from 3.3.3 to 3.3.4 will have an hard time doing so.
>
> To simplify things a new 3.3.5 release is out.
> Just install the new one and things should automatically work.
>
> Download link:
>  http://download.osgeo.org/geos/geos-3.3.5.tar.bz2

I am not sure this is the best mailing list to write.
I downloaded the archive and unpacked it.

./configure
stefano@ubuntu1204vm:~/sources/geos-3.3.5$ ./configure
configure: error: cannot find install-sh, install.sh, or shtool in "."
"./.." "./../.."

Cheers

Stefano

>
> Changes:
>  http://trac.osgeo.org/geos/browser/tags/3.3.5/NEWS
>
> MD5 sum of the tarball:
>  e372dd5065b29f99febc7b0c03fce9cf
>
> --strk;
>
---
41.95581N 12.52854E


http://www.linkedin.com/in/stefanoiacovella

http://twitter.com/#!/Iacovellas
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] GEOS 3.3.5 released

2012-06-25 Thread Sandro Santilli
Due to an error in versioning of the C library shipped with GEOS-3.3.4
(which was inferior to the version of the one shipped with GEOS-3.3.3)
those one upgrading from 3.3.3 to 3.3.4 will have an hard time doing so.

To simplify things a new 3.3.5 release is out.
Just install the new one and things should automatically work.

Download link:
 http://download.osgeo.org/geos/geos-3.3.5.tar.bz2

Changes:
 http://trac.osgeo.org/geos/browser/tags/3.3.5/NEWS

MD5 sum of the tarball:
 e372dd5065b29f99febc7b0c03fce9cf

--strk;

 Sent from our free software
 http://www.gnu.org/philosophy/free-sw.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Problem compiling PostGIS2.0 with GEOS 1.3.3+

2012-06-25 Thread Jan Hartmann


On 06/25/2012 11:32 AM, Sandro Santilli wrote:


Autotools do something like this:

DEFAULT_INCLUDES = -I. -I$(top_builddir)/include -I$(top_builddir)/include/geos
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)

Where DEFAULT_INCLUDES is automatically generated and $(CPPFLAGS)
and $(CXXFLAGS) are the ones you eventually override.

In PostGIS we don't have this double definition so it won't work:

 $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<

I guess we could add a $(DEFAULT_INCLUDES) right before the CFLAGS.
Then you could use:

  make CFLAGS=...

Note that "CFLAGS=... make" has no effect on either PostGIS or GEOS
(autotools-based) for me.


No, it is a configure problem. Sorry, I didn't explain it right. The 
command is "CFLAGS=... LDFLAGS=...  configure".  After that, all 
following "makes" include those paths before all system generated paths. 
The problem arises when in an earlier path there is an older version of 
a library or header file. I don't see a simple solution.


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


Re: [postgis-users] Problem compiling PostGIS2.0 with GEOS 1.3.3+

2012-06-25 Thread Sandro Santilli
On Mon, Jun 25, 2012 at 09:15:18AM +0200, Jan Hartmann wrote:
> 
> On 06/24/2012 05:43 PM, Sandro Santilli wrote:
> >On Sat, Jun 23, 2012 at 11:20:07AM +0200, Jan Hartmann wrote:
> >
> >I'd rather make sure -I appears first.
> >Can you handle to do so by tweaking the Makefile.in files ?
> >
> >Would you file a ticket to handle this ? Thanks !
> >
> >
> I'm not sure that is the solution. I always compile to non-standard
> locations with
> 
> CFLAGS="-I/home/user/include" LDFLAGS="-L/home/user/lib" make
> 
> Those "home" directories will always come before whatever is in the
> Makefile. I guess this can be more generally a cause for problems
> with older versions, although I have never met one before. I'll
> think further about it, but if you have any suggestions, please say
> so.

Autotools do something like this:

DEFAULT_INCLUDES = -I. -I$(top_builddir)/include -I$(top_builddir)/include/geos
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)

Where DEFAULT_INCLUDES is automatically generated and $(CPPFLAGS) 
and $(CXXFLAGS) are the ones you eventually override.

In PostGIS we don't have this double definition so it won't work:

$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<

I guess we could add a $(DEFAULT_INCLUDES) right before the CFLAGS.
Then you could use:

 make CFLAGS=...

Note that "CFLAGS=... make" has no effect on either PostGIS or GEOS
(autotools-based) for me.

--strk;

 Sent from our free software
 http://www.gnu.org/philosophy/free-sw.html
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Selecting pairs of points that have the samedistance between them

2012-06-25 Thread Francois Hugues
Hello,

 

I may be wrong but I don't see any answer to your question. Below is a request 
which could do the job you need if I understood it well :

 

Hugues

 

PS : as you can see Nicolas, I learnt from your mail and I'm now able to create 
a "serial" column into a request ;)

 

create temp sequence myseq increment by 1 Minvalue 1;

 

with mydist as (

 

select nextval('myseq') new_id, a.id id1, b.id id2, st_distance(a.geom, b.geom) 
dist from my table_of_points a, my table_of_points b

where a.id < b.id

 

)

 

select a.new_id n_id1, b.new_id n_id2, id1, id2  from mydist

where a.new_id < b.new_id

and a.dist = b.dist

 

 

De : postgis-users-boun...@postgis.refractions.net 
[mailto:postgis-users-boun...@postgis.refractions.net] De la part de Bob Pawley
Envoyé : dimanche 24 juin 2012 20:16
À : postgis-users@postgis.refractions.net
Objet : [postgis-users] Selecting pairs of points that have the samedistance 
between them

 

Hi

 

I have a geometry of points (more than one pair) that represent the 
intersections between a line and a column of multistrings. 

 

Can anyone point me to a method of determining which pairs of points are the 
same distance apart as are other pairs of points.

 

This will isolate the closed object from the open object for me.

 

The srid is all -1.

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


Re: [postgis-users] Error adding raster support

2012-06-25 Thread Luis
Hi Bborie, here it is:

$ ldd /home/weastflows/temp/postgis-2.0.0/raster/rt_pg/rtpostgis-2.0.so
linux-vdso.so.1 =>  (0x7fffb8c98000)
libgdal.so.1 => /usr/local/lib/libgdal.so.1 (0x7fde9a573000)
libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0x7fde9a34e000)
libc.so.6 => /lib/libc.so.6 (0x7fde99fca000)
libgeos-3.3.4.so => /usr/local/lib/libgeos-3.3.4.so (0x7fde99c29000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x7fdec000)
libodbc.so.1 => not found
libodbcinst.so.1 => not found
libxerces-c.so.28 => not found
libjasper.so.1 => not found
libnetcdf.so.4 => not found
libhdf5.so.6 => not found
libmfhdfalt.so.0 => not found
libdfalt.so.0 => not found
libgif.so.4 => not found
libjpeg.so.62 => not found
libpng12.so.0 => /lib/libpng12.so.0 (0x7fde99771000)
libpq.so.5 => /usr/lib/libpq.so.5 (0x7fde99544000)
libz.so.1 => /lib/libz.so.1 (0x7fde9932c000)
libpthread.so.0 => /lib/libpthread.so.0 (0x7fde9910f000)
librt.so.1 => /lib/librt.so.1 (0x7fde98f07000)
libdl.so.2 => /lib/libdl.so.2 (0x7fde98d02000)
libcurl-gnutls.so.4 => /usr/lib/libcurl-gnutls.so.4 (0x7fde98abf000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fde987ab000)
libm.so.6 => /lib/libm.so.6 (0x7fde98527000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x7fde9831)
/lib64/ld-linux-x86-64.so.2 (0x7fde9b549000)
libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x7fde980bd000)
libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x7fde97d2c000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x7fde97a68000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x7fde97863000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x7fde9762f000)
libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x7fde973e3000)
libidn.so.11 => /usr/lib/libidn.so.11 (0x7fde971af000)
liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x7fde96fa1000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x7fde96cff000)
libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x7fde96a86000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x7fde9686)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x7fde96657000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x7fde96454000)
libresolv.so.2 => /lib/libresolv.so.2 (0x7fde9623b000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x7fde9602)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x7fde95e0f000)
libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x7fde95c0b000)

Thanks for answering.

--
View this message in context: 
http://postgis.17.n6.nabble.com/Error-adding-raster-support-tp4998034p4998559.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] TopologyException and ST_Intersection

2012-06-25 Thread Nicolas Ribot
Hi,

Check the validity of input geometries with st_isValid() and
st_isValidReason() and if invalid objects are found, you can correct
them using st_makeValid()

Nicolas

On 25 June 2012 03:18, Derek Morgan  wrote:
> I am attempting to get the area of intersection between to vector
> polygon tables in PostGIS.  I am using the following SQL:
>
> SELECT ctys.fips,
>       Sum(ST_Area(ST_Intersection(ctys.the_geom,pads.the_geom)))
> FROM counties4269 ctys,
>     padus4269 pads
> WHERE ST_Overlaps(ctys.the_geom, pads.the_geom)
> GROUP by ctys.fips;
>
> However, my query returns the following error:  TopologyException:
> side location conflict at 1.66342e+06 1.99261e+06
> ERROR:  GEOS overlaps() threw an error!
>
> I am guessing that this has to do with some topology issues.  Any help
> or pointers would be greatly appreciated.
>
> Thanks,
> Derek
> ___
> 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] vector layer manipulation

2012-06-25 Thread Nicolas Ribot
Hi,

st_dumppoints will do that.

Nicolas

On 24 June 2012 13:52, chathura silva  wrote:
> suppose you are given the co-ordinates of starting and end points of a road
> segment.
> Is there any way to extract the other set of co-ordinates laying on the road
> segment
> ?
>
> An example +
>
> Here's an approach using Spatialite:
> You can use the spatialite functions DissolvePoints() or DissolveSegments()
> to get each point or line segment along a LINESTRING. Here's an example:
>
> (I created  in advance a sample LINESTRING called 'seg')
> PRAGMA table_info("seg");
> 0    pk_uid    integer    0    NULL    1
> 1    label    text    0    NULL    0
> 2    Geometry    LINESTRING    0    NULL    0
>
> SELECT * FROM seg;
> 1    a    BLOB sz=176 GEOMETRY
> 2    b    BLOB sz=112 GEOMETRY
>
> (I have two simple LINESTRINGs)
> SELECT AsText(Geometry) FROM seg;
> LINESTRING(1 1, 2 1, 2 2, 3 2, 4 2, 5 3, 6 2, 7 1)
> LINESTRING(2 2, 2 4, 4 4, 5 2)
>
> Now, I want to choose one of the linestrings, based on it's start and end
> points:
> SELECT AsText(Geometry) FROM seg
>     WHERE StartPoint(Geometry) = GeomFromText('POINT(1 1)', 4326) AND
>                     EndPoint(Geometry) = GeomFromText('POINT(7 1)', 4326);
> LINESTRING(1 1, 2 1, 2 2, 3 2, 4 2, 5 3, 6 2, 7 1)
>
> and to break up the LINESTRING into its segments:
> SELECT AsText(DissolveSegments(Geometry)) FROM seg
>     WHERE StartPoint(Geometry) = GeomFromText('POINT(1 1)', 4326) AND
>         EndPoint(Geometry) = GeomFromText('POINT(7 1)', 4326);
> MULTILINESTRING((1 1, 2 1), (2 1, 2 2), (2 2, 3 2), (3 2, 4 2), (4 2, 5 3),
> (5 3, 6 2), (6 2, 7 1))
>
>
> ___
> 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] Problem compiling PostGIS2.0 with GEOS 1.3.3+

2012-06-25 Thread Jan Hartmann


On 06/24/2012 05:43 PM, Sandro Santilli wrote:

On Sat, Jun 23, 2012 at 11:20:07AM +0200, Jan Hartmann wrote:

I'd rather make sure -I appears first.
Can you handle to do so by tweaking the Makefile.in files ?

Would you file a ticket to handle this ? Thanks !


I'm not sure that is the solution. I always compile to non-standard 
locations with


CFLAGS="-I/home/user/include" LDFLAGS="-L/home/user/lib" make

Those "home" directories will always come before whatever is in the 
Makefile. I guess this can be more generally a cause for problems with 
older versions, although I have never met one before. I'll think further 
about it, but if you have any suggestions, please say so.


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