Re: [postgis-users] hierarchical topology and attributes at different levels

2012-10-22 Thread William Kyngesburye
On Oct 21, 2012, at 2:40 PM, Sandro Santilli wrote:

> On Fri, Oct 19, 2012 at 11:56:18AM -0500, William Kyngesburye wrote:
> 
>> Can the attributes of child layers be seen from a layer? 
> 
> Sure, given enough neurons to build the appropriate SQL query...
> (TopoGeomeometry management still has rough edges)
> 
Yes, this has been taxing my neurons ;)

> It would be something like this:
> 
> SELECT * FROM child_features c, parent_features s
> WHERE id(c.topogeom) = GetTopoGeomElements(s.topogeom)[2];
> 
> Fixing the syntax is left as an excercise to the reader
> 
For now I'm interested in the possibilities.  I'm working on how I want to 
structure it and how to get the data in first.  I can get the base level of 
polys into topology, but I need to figure out how to connect higher level 
existing polygon data to the child levels (the states which are constructed 
from counties).  I guess when I figure that out, I'll know a lot more about how 
to do the query linking child-parent attributes.


-
William Kyngesburye 
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled with hyena 
offal?
Second Pogril: I don't know.  Why IS life like sticking your head in a bucket 
filled with hyena offal?
First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy


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


[postgis-users] hierarchical topology and attributes at different levels

2012-10-19 Thread William Kyngesburye
I'm trying to figure out what I can do with hierarchical topology.  So far I 
understand (more or less) the construction of PostGIS topology and hierarchical 
topology, but I only have a vague conceptual idea of querying.

I have (want) a hierarchical organization of administrative areas: states 
(layer 3) and counties (layer 2).  Counties are a child layer of states, both 
are multipolygons grouped by the county or state.

I also have attributes for the minimum and maximum scale that individual faces 
can be displayed.  This is a child layer (layer 1) of counties.  ie, tiny 
coastal islands are not displayed at small scales.

Can the attributes of child layers be seen from a layer?  Or for my specific 
example, can I query for counties or states and only get the component faces 
(layer 1) where the query scale is within the min/max scale of the faces?  I 
guess it would be like a dynamic topogeometry that is a subset of the static 
defined topogeometry for the layer.

Maybe the query logic is backwards - instead, query the faces layer for the 
scale match, grouped by the parent layer of interest?  With the topological 
relationship nature of topology, would I even need a hierarchical setup for 
this reversed query?

-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


Re: [postgis-users] replicating features on self-join

2012-09-27 Thread William Kyngesburye
On Sep 27, 2012, at 10:12 AM, Martin Davis wrote:

> Touches is a complex topological relationship (overly, perhaps?) which takes 
> a long time to compute on large geometries.  It's also computing more 
> information than you need (since it sounds like you already know the lines 
> touch only at endpoints).  So working with just the endpoint should be 
> faster, for sure.
> 
> CoveredBy is more amenable to optimization, which is why it is faster.
> 
And really fast when I get the SQL right - UPDATEs are different than SELECTs 
;)  I finally figured out that I shouldn't use a JOIN in an update, even a 
small region went on forever until I stopped it.  Put the st_coveredby in the 
where and the whole table processed in a couple minutes.

I doing the update in stages, for sanity.  Now working on the touching updates. 
 Phwew.

> On 9/26/2012 7:21 AM, William Kyngesburye wrote:
>> I'm working on updating the tables instead.  The idea was to save a lot of 
>> preprocessing time on the whole table, and morph the classifications when 
>> extracting small regions.
>> 
>> distinct on + order by (to get the same priority of reclassification as the 
>> case statement) was really slow even for a small region.  I imagine group by 
>> would be similarly slow, and as you say other attributes would have to be 
>> restored in another step.
>> 
>> st_touches() appears to be the time consuming part.  I'm trying 
>> st_distance() with start-end points on both sides (4 joins) to speed this 
>> up.  st_coveredby() seems to go a lot faster than the touch join.
>> 
>> On Sep 25, 2012, at 11:19 PM, Martin Davis wrote:
>> 
>>> This is one of those cases that SQL seems to make unnecessarily difficult.  
>>> Writing this query in a procedural way would be trivial, so why is it so 
>>> hard to express in a declarative relational way?
>>> 
>>> DISTINCT ON (a.id) is the classic non-standard Postgres way of handling 
>>> this.
>>> 
>>> The other hack to get uniqueness of the driving table is to GROUP BY a.id.  
>>> You then need to use appropriate aggregation functions to maintain the 
>>> dependent columns from a.  You might be able to use MAX on newclass.  MAX 
>>> might work for the other invariate a columns too, but it might be faster to 
>>> use FIRST. This is not built into Postgres, but is available as an 
>>> extension:
>>> 
>>> http://wiki.postgresql.org/wiki/First/last_%28aggregate%29
>>> 
>>> Or, you could just SELECT a.id, MAX(newclass) and then join back to a to 
>>> recover the dependent columns.
>>> 
>>> No idea whether any of these ideas will be performant.  Maybe someone else 
>>> has a more clever way of doing this.
>>> 
>>> On 9/25/2012 10:48 AM, William Kyngesburye wrote:
>>>> I'm trying to do a series of joins to classify some lines based on other 
>>>> lines they are touching in the same table and whether they are in polygons 
>>>> in another table, and lines are replicating.
>>>> 
>>>> in a simplified form, it's something like (I imported with GDAL, so all my 
>>>> geometry fields are wkb_geometry):
>>>> 
>>>> select a.wkb_geometry, a.id, a.name, a.class,
>>>>   case
>>>> when a.class = 'a' and b.class is not NULL and (d1.newclass = 'b' or 
>>>> d2.newclass = 'b') then 'b'
>>>> ...
>>>> else a.class
>>>>   as newclass
>>>> from source as a left outer join polys as b st_coveredby(a.wkb_geometry, 
>>>> b.wkb_geometry)
>>>> left outer join source as c1 on st_touches(st_startpoint(a.wkb_geometry), 
>>>> c1.wkb_geometry)
>>>> left outer join source as c2 on st_touches(st_endpoint(a.wkb_geometry), 
>>>> c2.wkb_geometry)
>>>> 
>>>> All lines are replicated 4-9 times (maybe more that I didn't notice), each 
>>>> duplicate with different newclass values though some newclass values 
>>>> duplicated also (I suppose dependent on which join it came from).
>>>> 
>>>> How can I stop the replication?  Probably some SQL thing, the different 
>>>> join types still confuse me some.
>>>> 
>>>> Adding a DISTINCT on the id to the select (and a sort to make that work) 
>>>> adds a LOT to the processing time processing time.
>>>> 
>>>> -
>>>> William Kyngesburye 
>>>> http://www.kyngchaos.com/
>>>> 
>>>> &

Re: [postgis-users] replicating features on self-join

2012-09-26 Thread William Kyngesburye
I'm working on updating the tables instead.  The idea was to save a lot of 
preprocessing time on the whole table, and morph the classifications when 
extracting small regions.

distinct on + order by (to get the same priority of reclassification as the 
case statement) was really slow even for a small region.  I imagine group by 
would be similarly slow, and as you say other attributes would have to be 
restored in another step.

st_touches() appears to be the time consuming part.  I'm trying st_distance() 
with start-end points on both sides (4 joins) to speed this up.  st_coveredby() 
seems to go a lot faster than the touch join.

On Sep 25, 2012, at 11:19 PM, Martin Davis wrote:

> This is one of those cases that SQL seems to make unnecessarily difficult.  
> Writing this query in a procedural way would be trivial, so why is it so hard 
> to express in a declarative relational way?
> 
> DISTINCT ON (a.id) is the classic non-standard Postgres way of handling this.
> 
> The other hack to get uniqueness of the driving table is to GROUP BY a.id.  
> You then need to use appropriate aggregation functions to maintain the 
> dependent columns from a.  You might be able to use MAX on newclass.  MAX 
> might work for the other invariate a columns too, but it might be faster to 
> use FIRST. This is not built into Postgres, but is available as an extension:
> 
> http://wiki.postgresql.org/wiki/First/last_%28aggregate%29
> 
> Or, you could just SELECT a.id, MAX(newclass) and then join back to a to 
> recover the dependent columns.
> 
> No idea whether any of these ideas will be performant.  Maybe someone else 
> has a more clever way of doing this.
> 
> On 9/25/2012 10:48 AM, William Kyngesburye wrote:
>> I'm trying to do a series of joins to classify some lines based on other 
>> lines they are touching in the same table and whether they are in polygons 
>> in another table, and lines are replicating.
>> 
>> in a simplified form, it's something like (I imported with GDAL, so all my 
>> geometry fields are wkb_geometry):
>> 
>> select a.wkb_geometry, a.id, a.name, a.class,
>>   case
>> when a.class = 'a' and b.class is not NULL and (d1.newclass = 'b' or 
>> d2.newclass = 'b') then 'b'
>> ...
>> else a.class
>>   as newclass
>> from source as a left outer join polys as b st_coveredby(a.wkb_geometry, 
>> b.wkb_geometry)
>> left outer join source as c1 on st_touches(st_startpoint(a.wkb_geometry), 
>> c1.wkb_geometry)
>> left outer join source as c2 on st_touches(st_endpoint(a.wkb_geometry), 
>> c2.wkb_geometry)
>> 
>> All lines are replicated 4-9 times (maybe more that I didn't notice), each 
>> duplicate with different newclass values though some newclass values 
>> duplicated also (I suppose dependent on which join it came from).
>> 
>> How can I stop the replication?  Probably some SQL thing, the different join 
>> types still confuse me some.
>> 
>> Adding a DISTINCT on the id to the select (and a sort to make that work) 
>> adds a LOT to the processing time processing time.
>> 
>> -
>> William Kyngesburye 
>> http://www.kyngchaos.com/
>> 
>> "Oh, look, I seem to have fallen down a deep, dark hole.  Now what does that 
>> remind me of?  Ah, yes - life."
>> 
>> - Marvin
>> 
>> 
>> ___
>> postgis-users mailing list
>> postgis-users@postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> 
>> 
>> -
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2012.0.2221 / Virus Database: 2441/5290 - Release Date: 09/24/12
>> 
>> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


[postgis-users] replicating features on self-join

2012-09-25 Thread William Kyngesburye
I'm trying to do a series of joins to classify some lines based on other lines 
they are touching in the same table and whether they are in polygons in another 
table, and lines are replicating.

in a simplified form, it's something like (I imported with GDAL, so all my 
geometry fields are wkb_geometry):

select a.wkb_geometry, a.id, a.name, a.class,
  case
when a.class = 'a' and b.class is not NULL and (d1.newclass = 'b' or 
d2.newclass = 'b') then 'b'
...
else a.class
  as newclass
from source as a left outer join polys as b st_coveredby(a.wkb_geometry, 
b.wkb_geometry)
left outer join source as c1 on st_touches(st_startpoint(a.wkb_geometry), 
c1.wkb_geometry)
left outer join source as c2 on st_touches(st_endpoint(a.wkb_geometry), 
c2.wkb_geometry)

All lines are replicated 4-9 times (maybe more that I didn't notice), each 
duplicate with different newclass values though some newclass values duplicated 
also (I suppose dependent on which join it came from).

How can I stop the replication?  Probably some SQL thing, the different join 
types still confuse me some.

Adding a DISTINCT on the id to the select (and a sort to make that work) adds a 
LOT to the processing time processing time.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what does that 
remind me of?  Ah, yes - life."

- Marvin


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


Re: [postgis-users] mac 10.8

2012-08-24 Thread William Kyngesburye
On Aug 24, 2012, at 10:16 AM, Randy Horner wrote:

> I'm sure you are correct.  A couple questions if you have the time:
> 
> To uninstall a failed postgres/postgis, we stop the postgres service and 
> delete any directories we find.  Anything we are missing?  How does the 
> staker check for installed versions of postgres/postgis?
> 
I don't know how stackbuilder works.

> Does installing gdal 1.9 Complete from your site satisfy the geos 3 and proj4 
> requirements for postgis?  Only your distribution or anyone's distribution of 
> postgis?
> 
Everything needed is specified on my PostGIS page and is available on my site.  
Other PostGIS distributions may use my frameworks (GDAL, ...), but for 
something like stackbuilder or homebrew they usually do everything.

> Finally, we have many postgis 1.5.. database's on a windows servers.  Should 
> we be able to back them up and then restore them on a postgis 2.0 fresh 
> install? 
> 
The PostGIS documentation has upgrade procedures, but basically yes - dump from 
1.5, load into 2.0.

> Sorry for my ignorance, we love gis and postgres/postgis but our we are 
> pretty new to the mac arena.
> 
> 
> And thanks for the quick reply.  All of us appreciate your site and helpful 
> work you do.
> 
> 
> 
> 
> -Original Message-
> From: William Kyngesburye [mailto:wokl...@kyngchaos.com] 
> Sent: Friday, August 24, 2012 8:36 AM
> To: PostGIS Users Discussion
> Cc: Randy Horner
> Subject: Re: [postgis-users] mac 10.8
> 
> I sounds like you might be mixing distributions - maybe stackbuilder Postgres 
> + my PostGIS?  If it's my PostGIS package, I only support my Postgres package.
> 
> On Aug 24, 2012, at 8:26 AM, Randy Horner wrote:
> 
>> When using one click install postgres 9.1.5 install for max 10.8 the stack 
>> builder installer does not list postgis 2.0.  (only 1.5)  When I install 1.5 
>> it says it was installed successfully but nothing is put on the mac.  No 
>> postgis.sql or anything.  This happens on all of our mac books.  When I try 
>> to run the postgis 2 install seperately, it says postgres 9.1 is required. 
>> (It is installed and running). 
> 
> -
> William Kyngesburye  http://www.kyngchaos.com/
> 
> All generalizations are dangerous, even this one.
> 
> 

-
William Kyngesburye 
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect


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


Re: [postgis-users] mac 10.8

2012-08-24 Thread William Kyngesburye
I sounds like you might be mixing distributions - maybe stackbuilder Postgres + 
my PostGIS?  If it's my PostGIS package, I only support my Postgres package.

On Aug 24, 2012, at 8:26 AM, Randy Horner wrote:

> When using one click install postgres 9.1.5 install for max 10.8 the stack 
> builder installer does not list postgis 2.0.  (only 1.5)  When I install 1.5 
> it says it was installed successfully but nothing is put on the mac.  No 
> postgis.sql or anything.  This happens on all of our mac books.  When I try 
> to run the postgis 2 install seperately, it says postgres 9.1 is required. 
> (It is installed and running). 

-----
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] raster extent and performance problem... anyone?

2012-08-23 Thread William Kyngesburye
1.9.1 - yes, I saw your discussion about GDAL problems.  Maybe the rounding bug 
has something to do with it, but even when no bounding box is used from GDAL 
(like when I just want to query what the extent is of the whole raster), I get 
the wrong extents and horrible performance.

I'd like to at least verify that the PostGIS raster is OK first.  GDAL dev is 
not really a good option since I need to deploy the extraction scripts on a few 
computers very soon, and it's best if I can use a packaged distribution.

The vrt of the original geotiffs works, so that's what I'll probably be using.

On Aug 23, 2012, at 1:37 PM, Bborie Park wrote:

> What version of GDAL are you using?  Could you try GDAL trunk?  I don't
> trust anything other than trunk (1.9.x or below) due to various bugs.
> At some point, I'll dig into the PostGIS raster driver...
> 
> -bborie
> 
> On 08/23/2012 07:01 AM, William Kyngesburye wrote:
>> almost forgot: PostGIS 2.0.1, on PG 9.1.4.  PPC OS X.
>> 
>> On Aug 23, 2012, at 8:46 AM, William Kyngesburye wrote:
>> 
>>> I created a raster table for a large area of DEM data, with index and 
>>> constraints, no overviews.  When I run gdalinfo on the table, it takes 
>>> about 15m to query to get the extents, which are then wrong.
>>> 
>>> Original 32bit float geotiffs = 27GiB (uncompressed), 84W, 36N to 71W, 
>>> 45.5N (not complete coverage)
>>> 
>>> In PostGIS = 25GiB, 74W, 33.5N to 61W, 43N
>>> 
>>> There are 15936 records in the table, which matches the number of input 
>>> TIFFs and the tile size I used (actually 22 more than the input), so it 
>>> looks like all the data was imported.
>>> 
>>> It looks like the data was shifted 10 deg east and 2.5 deg south.
>>> 
>>> When I try to extract a region from that with gdal_translate, it takes the 
>>> 15m to check the extants again, then extracts garbage.
>>> 
>>> I'm just getting started with PG rasters and don't know enough about the 
>>> SQL needed to check within PG if everything is OK there or not (extents, 
>>> extract some data to tif) or if it's a GDAL problem.
>>> 
>>> A GDAL vrt of the geotiffs processes quickly and reports the correct 
>>> extents.
>>> 
>>> -
>>> William Kyngesburye 
>>> http://www.kyngchaos.com/
>>> 
>>> "Time is an illusion - lunchtime doubly so."
>>> 
>>> - Ford Prefect
>>> 
>>> ___
>>> postgis-users mailing list
>>> postgis-users@postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> 
>> -
>> William Kyngesburye 
>> http://www.kyngchaos.com/
>> 
>> "I ache, therefore I am.  Or in my case - I am, therefore I ache."
>> 
>> - Marvin
>> 
>> 
>> ___
>> 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

-
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] raster extent and performance problem... anyone?

2012-08-23 Thread William Kyngesburye
almost forgot: PostGIS 2.0.1, on PG 9.1.4.  PPC OS X.

On Aug 23, 2012, at 8:46 AM, William Kyngesburye wrote:

> I created a raster table for a large area of DEM data, with index and 
> constraints, no overviews.  When I run gdalinfo on the table, it takes about 
> 15m to query to get the extents, which are then wrong.
> 
> Original 32bit float geotiffs = 27GiB (uncompressed), 84W, 36N to 71W, 45.5N 
> (not complete coverage)
> 
> In PostGIS = 25GiB, 74W, 33.5N to 61W, 43N
> 
> There are 15936 records in the table, which matches the number of input TIFFs 
> and the tile size I used (actually 22 more than the input), so it looks like 
> all the data was imported.
> 
> It looks like the data was shifted 10 deg east and 2.5 deg south.
> 
> When I try to extract a region from that with gdal_translate, it takes the 
> 15m to check the extants again, then extracts garbage.
> 
> I'm just getting started with PG rasters and don't know enough about the SQL 
> needed to check within PG if everything is OK there or not (extents, extract 
> some data to tif) or if it's a GDAL problem.
> 
> A GDAL vrt of the geotiffs processes quickly and reports the correct extents.
> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
> 
> "Time is an illusion - lunchtime doubly so."
> 
> - Ford Prefect
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


[postgis-users] raster extent and performance problem... anyone?

2012-08-23 Thread William Kyngesburye
I created a raster table for a large area of DEM data, with index and 
constraints, no overviews.  When I run gdalinfo on the table, it takes about 
15m to query to get the extents, which are then wrong.

Original 32bit float geotiffs = 27GiB (uncompressed), 84W, 36N to 71W, 45.5N 
(not complete coverage)

In PostGIS = 25GiB, 74W, 33.5N to 61W, 43N

There are 15936 records in the table, which matches the number of input TIFFs 
and the tile size I used (actually 22 more than the input), so it looks like 
all the data was imported.

It looks like the data was shifted 10 deg east and 2.5 deg south.

When I try to extract a region from that with gdal_translate, it takes the 15m 
to check the extants again, then extracts garbage.

I'm just getting started with PG rasters and don't know enough about the SQL 
needed to check within PG if everything is OK there or not (extents, extract 
some data to tif) or if it's a GDAL problem.

A GDAL vrt of the geotiffs processes quickly and reports the correct extents.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect

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


[postgis-users] raster extent and performance problem

2012-08-16 Thread William Kyngesburye
I created a raster table for a large area of DEM data, with index and 
constraints, no overviews.  When I run gdalinfo on the table, it takes about 
15m to query to get the extents, which are then wrong.

Original 32bit float geotiffs = 27GiB (uncompressed), 84W, 36N to 71W, 45.5N 
(not complete coverage)

In PostGIS = 25GiB, 74W, 33.5N to 61W, 43N

There are 15936 records in the table, which matches the number of input TIFFs 
and the tile size I used (actually 22 more than the input), so it looks like 
all the data was imported.

It looks like the data was shifted 10 deg east and 2.5 deg south.

When I try to extract a region from that with gdal_translate, it takes the 15m 
to check the extants again, then extracts garbage.

I'm just getting started with PG rasters and don't know enough about the SQL 
needed to check within PG if everything is OK there or not or if it's a GDAL 
problem.

A GDAL vrt of the geotiffs processes quickly and reports the correct extents.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect


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


Re: [postgis-users] Problem enabling postgis (Mac OS)

2012-08-13 Thread William Kyngesburye
On Aug 13, 2012, at 6:43 PM, António Rodrigues wrote:

> I uninstalled everything (again) manually since the binaries I last used 
> (from http://postgresapp.com/) did not have any uninstaller.
> 
OK, you used a different Postgres in the past, and uninstalled that (I've never 
heard of postgres.app, but it looks like a simple uninstall).  It sounded like 
you tried uninstalling my Postgres.


> I installed again the binaries from kyngchaos. Postgis is in 
> /usr/local/pgsql-9.1/share/contrib/postgis-2.0.
> 
> The question is: in order to create a Postgis extension inside my database, 
> when in pgadmin I create a new extension, there is no Postgis option. Can I 
> just copy what is in the Postgis-2.0 folder into 
> /usr/local/pgsql-9.1/share/extension ?

No, you can't copy share/contrib/postgis-2.0 files to share/extensions.  It's 
very odd that you have no PostGIS extension files.  Try reinstalling just 
PostGIS, and you don't need to uninstall anything.

> Thanks,
> Pedro
> 
> On Mon, Aug 13, 2012 at 11:29 PM, William Kyngesburye  
> wrote:
> How did you remove Postgres?
> 
> Were there any errors in the installation of PostGIS?
> 
> On Aug 13, 2012, at 9:57 AM, António Rodrigues wrote:
> 
> > Thanks for the reply.
> >
> > I completely removed postgresql. Re-installed from PostgreSQL-9.1.4-1.dmg 
> > and PostGIS-2.0.1-1.dmg. Now there are no traces of postgis in 
> > /usr/local/pgsql-9.1. Is this normal?
> >
> > One other thing, from what I read and sticking for now to the advice of 
> > enabling postgis using extensions, shouldn't the postgis sql stuff be here 
> > -> /usr/local/pgsql-9.1/share/extension, so that in pgadmin, choosing new, 
> > postgis would show up as an option?
> >
> > Sorry if I'm missing something obvious.
> > Thanks,
> > Pedro
> >
> > On Sun, Aug 12, 2012 at 4:51 AM, William Kyngesburye 
> >  wrote:
> > On Aug 11, 2012, at 8:35 PM, António Rodrigues wrote:
> >
> > > Hi list,
> > >
> > > I'm having problems enabling postgis on a mac running Mountain Lion. Most 
> > > likely this is due to my absolute lack of experience with postgresql, but 
> > > I've read the documentation, searched the web and so far, no luck.
> > >
> > > This is what I've done
> > >
> > > Installed GDAL_Complete-1.9.dmg, PostgreSQL-9.1.4-1.dmg and 
> > > PostGIS-2.0.1-1.dmg from kyngchaos (in this order)
> > >
> > > During installation, I was not prompted for a postgres password, hence I 
> > > had problems when connecting as user (role) postgres.
> >
> > This is normal - no password is set for the postgres role on installation.  
> > Local connections to postgres are all allowed without a password, and no 
> > external connections are allowed at all, in the default configuration 
> > (pg_hba.conf), so it should work, but the readme suggests setting a 
> > password (especially if you install it on a shared computer).
> >
> > > In pgadmin I created a new role as superuser.
> > >
> > > --
> > > From PostGIS documentation, I tried (in the psql console plugin…
> > >
> > > (p.14 in PostGIS 2.0.0 Manual)
> > >
> > > createdb db1
> > > createlang plpgsql db1
> > > psql -d db1 -f postgis.sql
> > > psql -d db1 -f spatial_ref_sys.sql
> > > psql -d db1 -f postgis_comments.sql
> > > psql -d db1 -f rtpostgis.sql
> > > psql -d db1 -f raster_comments.sql
> > > psql -d db1 -f topology/topology.sql
> > > psql -d db1 -f topology/topology_comments.sql
> > > psql -d db1 -f legacy.sql
> > >
> > > Nothing new: no postgis functions...
> > >
> > > Then Using the psql console plugin I typed:
> > > (p. 15PostGIS 2.0.0 Manual)
> > > psql -d db -c "CREATE EXTENSION postgis;"
> > > psql -d db -c "CREATE EXTENSION postgis_topology;"
> > >
> > > Again no good.
> >
> > The problem may be that without any user flag, psql uses your system login 
> > name to connect to postgres.  If you don't setup your login name as a 
> > postgres role, you won't connect.  You need to add to your psql connection:
> >
> > -U postgres
> >
> > or other role with full permissions on the DB (I don't think you need 
> > superuser perms, only the superfluous createlang step in the old method 
> > did).
> >
> > note: stick with the extension method - easier to install and upgrade.
> >
> > > Then I pasted the code in from postgis.sql (fr

Re: [postgis-users] Problem enabling postgis (Mac OS)

2012-08-13 Thread William Kyngesburye
How did you remove Postgres?

Were there any errors in the installation of PostGIS?

On Aug 13, 2012, at 9:57 AM, António Rodrigues wrote:

> Thanks for the reply.
> 
> I completely removed postgresql. Re-installed from PostgreSQL-9.1.4-1.dmg and 
> PostGIS-2.0.1-1.dmg. Now there are no traces of postgis in 
> /usr/local/pgsql-9.1. Is this normal?
> 
> One other thing, from what I read and sticking for now to the advice of 
> enabling postgis using extensions, shouldn't the postgis sql stuff be here -> 
> /usr/local/pgsql-9.1/share/extension, so that in pgadmin, choosing new, 
> postgis would show up as an option?
> 
> Sorry if I'm missing something obvious.
> Thanks,
> Pedro
> 
> On Sun, Aug 12, 2012 at 4:51 AM, William Kyngesburye  
> wrote:
> On Aug 11, 2012, at 8:35 PM, António Rodrigues wrote:
> 
> > Hi list,
> >
> > I'm having problems enabling postgis on a mac running Mountain Lion. Most 
> > likely this is due to my absolute lack of experience with postgresql, but 
> > I've read the documentation, searched the web and so far, no luck.
> >
> > This is what I've done
> >
> > Installed GDAL_Complete-1.9.dmg, PostgreSQL-9.1.4-1.dmg and 
> > PostGIS-2.0.1-1.dmg from kyngchaos (in this order)
> >
> > During installation, I was not prompted for a postgres password, hence I 
> > had problems when connecting as user (role) postgres.
> 
> This is normal - no password is set for the postgres role on installation.  
> Local connections to postgres are all allowed without a password, and no 
> external connections are allowed at all, in the default configuration 
> (pg_hba.conf), so it should work, but the readme suggests setting a password 
> (especially if you install it on a shared computer).
> 
> > In pgadmin I created a new role as superuser.
> >
> > --
> > From PostGIS documentation, I tried (in the psql console plugin…
> >
> > (p.14 in PostGIS 2.0.0 Manual)
> >
> > createdb db1
> > createlang plpgsql db1
> > psql -d db1 -f postgis.sql
> > psql -d db1 -f spatial_ref_sys.sql
> > psql -d db1 -f postgis_comments.sql
> > psql -d db1 -f rtpostgis.sql
> > psql -d db1 -f raster_comments.sql
> > psql -d db1 -f topology/topology.sql
> > psql -d db1 -f topology/topology_comments.sql
> > psql -d db1 -f legacy.sql
> >
> > Nothing new: no postgis functions...
> >
> > Then Using the psql console plugin I typed:
> > (p. 15PostGIS 2.0.0 Manual)
> > psql -d db -c "CREATE EXTENSION postgis;"
> > psql -d db -c "CREATE EXTENSION postgis_topology;"
> >
> > Again no good.
> 
> The problem may be that without any user flag, psql uses your system login 
> name to connect to postgres.  If you don't setup your login name as a 
> postgres role, you won't connect.  You need to add to your psql connection:
> 
> -U postgres
> 
> or other role with full permissions on the DB (I don't think you need 
> superuser perms, only the superfluous createlang step in the old method did).
> 
> note: stick with the extension method - easier to install and upgrade.
> 
> > Then I pasted the code in from postgis.sql (from \usr\…contrib\postgis2.0 
> > directly in a sql window in pgadmin…
> >
> > I got the error message: "ERROR:  could not access file 
> > "$libdir/postgis-2.0": No such file or directory"
> > --
> >
> > I am aware this is a newby kind of problem, and I apologize for that, but 
> > some help would be really really great.
> > Thanks,
> > Pedro
> > ___
> > postgis-users mailing list
> > postgis-users@postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
> 
> Theory of the Universe
> 
> There is a theory which states that if ever anyone discovers exactly what the 
> universe is for and why it is here, it will instantly disappear and be 
> replaced by something even more bizarrely inexplicable.  There is another 
> theory which states that this has already happened.
> 
> -Hitchhiker's Guide to the Galaxy 2nd season intro
> 
> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an illusion 
caused by the passage of history."

- Hitchhiker's Guide to the Galaxy


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


Re: [postgis-users] Problem enabling postgis (Mac OS)

2012-08-11 Thread William Kyngesburye
On Aug 11, 2012, at 8:35 PM, António Rodrigues wrote:

> Hi list,
> 
> I'm having problems enabling postgis on a mac running Mountain Lion. Most 
> likely this is due to my absolute lack of experience with postgresql, but 
> I've read the documentation, searched the web and so far, no luck.
> 
> This is what I've done
> 
> Installed GDAL_Complete-1.9.dmg, PostgreSQL-9.1.4-1.dmg and 
> PostGIS-2.0.1-1.dmg from kyngchaos (in this order)
> 
> During installation, I was not prompted for a postgres password, hence I had 
> problems when connecting as user (role) postgres.

This is normal - no password is set for the postgres role on installation.  
Local connections to postgres are all allowed without a password, and no 
external connections are allowed at all, in the default configuration 
(pg_hba.conf), so it should work, but the readme suggests setting a password 
(especially if you install it on a shared computer).

> In pgadmin I created a new role as superuser.
> 
> --
> From PostGIS documentation, I tried (in the psql console plugin…
> 
> (p.14 in PostGIS 2.0.0 Manual)
> 
> createdb db1
> createlang plpgsql db1
> psql -d db1 -f postgis.sql
> psql -d db1 -f spatial_ref_sys.sql
> psql -d db1 -f postgis_comments.sql
> psql -d db1 -f rtpostgis.sql
> psql -d db1 -f raster_comments.sql
> psql -d db1 -f topology/topology.sql
> psql -d db1 -f topology/topology_comments.sql
> psql -d db1 -f legacy.sql
> 
> Nothing new: no postgis functions...
> 
> Then Using the psql console plugin I typed:
> (p. 15PostGIS 2.0.0 Manual)
> psql -d db -c "CREATE EXTENSION postgis;"
> psql -d db -c "CREATE EXTENSION postgis_topology;"
> 
> Again no good.

The problem may be that without any user flag, psql uses your system login name 
to connect to postgres.  If you don't setup your login name as a postgres role, 
you won't connect.  You need to add to your psql connection:

-U postgres

or other role with full permissions on the DB (I don't think you need superuser 
perms, only the superfluous createlang step in the old method did).

note: stick with the extension method - easier to install and upgrade.

> Then I pasted the code in from postgis.sql (from \usr\…contrib\postgis2.0 
> directly in a sql window in pgadmin…
> 
> I got the error message: "ERROR:  could not access file 
> "$libdir/postgis-2.0": No such file or directory"
> --
> 
> I am aware this is a newby kind of problem, and I apologize for that, but 
> some help would be really really great.
> Thanks,
> Pedro
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the 
universe is for and why it is here, it will instantly disappear and be replaced 
by something even more bizarrely inexplicable.  There is another theory which 
states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro


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


Re: [postgis-users] Install problem with PROJ directory

2012-06-29 Thread William Kyngesburye
--with-projdir=/Library/Frameworks/PROJ.framework/unix

should work (it's how I make my postgis package).  Configure will figure out 
the includes and other subdirs.  You probably also need:

--with-gdalconfig=/Library/Frameworks/GDAL.framework/unix/bin/gdal-config


On Jun 29, 2012, at 8:53 PM, Bob Holmstrom wrote:

> Hello - very novice user here.
> 
> I am doing a neighborhood history mapping project and want to use a MapBox 
> template.  In order to do so I need to "have PostgreSQL installed & running 
> with a PostGIS database setup within it."
> 
> I have an iMac model 8,1 running Snow Leopard 10.6.8
> 
> I have downloaded and installed PostgreSQL 9.1  - The install ran as per the 
> example shown in the www.enterprisedb.com/resources-community/pginst-guide 
> 
> I did not install any of the StackBuilder options as offered at the end of 
> the install.
> 
> I downloaded PostGIS after installing the GEOS and PROJ4 frameworks as per 
> the osm2pgsql installer instructions.  I also downloaded and installed XCODE 
> in order to get access to a c++ compiler.
> 
> ./configure  apparently requires extensions to enable pg_config, GEOS, PROJ, 
> and GUI?
> 
> ./configure --with-pgconfig=/Library/PostgreSQL/9.1/bin/pg_config 
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config
>   seems to run correctly through pg_config and GEOS and generates the error 
> "configure: error: could not find proj_api.h - you may need to specify the 
> directory of a PROJ.4 installation using --with-projdir"
> 
> The PostGIS install instructions say:
> 
> --with-projdir=DIR
> Proj4 is a reprojection library required by PostGIS. Use this parameter 
> (--with-projdir=/path/to/projdir) to manually specify a particular Proj4 
> installation directory that PostGIS will build against.
> 
> I don't find any directory titled "projdir"  and the file proj_api.h resides 
> in the path /Library/Frameworks/PROJ.framework/Versions/Current/Headers/
> 
> Can anyone help me with the appropriate form for the extra bit for the 
> ./configure statement?
> 
> Thanks
> 
> Bob
> 
> 
> 
> 
> 
> _______
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
all for things that the beasts of the jungle would not deign to possess - money 
to purchase the effeminate pleasures of weaklings.  And yet withal bound down 
by silly customs that make them slaves to their unhappy lot while firm in the 
belief that they be the lords of creation enjoying the only real pleasures of 
existence

- the wisdom of Tarzan


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


Re: [postgis-users] Best way to safely remove Kyng Chaos PSQL from a Mac?

2012-06-19 Thread William Kyngesburye
What problems are you having?  I can help, you only need to ask.

But, if you really want to uninstall:

I keep forgetting to add uninstall instructions to my Postgres & PostGIS.  
Quick-n-dirty:

stop postgres:

sudo launchctl unload /Library/LaunchDaemons/org.postgresql.postgres.plist

delete:

/usr/local/pgsql-9.1
/usr/local/pgsql
/Library/LaunchDaemons/org.postgresql.postgres.plist


On Jun 19, 2012, at 6:03 PM, Dheeraj Chand wrote:

> All, 
> 
> I'm having trouble getting the PSQL distributed on Kyng Chaos to install 
> correctly and run on my Mac. I'm interested in trying Postgres.App, which I 
> understand has PostGIS 2.0 built in!
> 
> Any instructions on how to safely remove the Kyng Chaos distro?
> 
> Best,
> 
> -dx
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] PostGIS 2.0 make problems on Mac Lion

2012-06-12 Thread William Kyngesburye
There is no need to compile - postgis_restore.pl IS in my PostGIS package.  
It's in pgsql/share/contrib/postgis-2.0.


On Jun 12, 2012, at 7:14 AM, Stefan Schwarzer wrote:

> Hi there,
> 
> I upgraded my machine from Snow Leopard to Lion, and ran, as usual, into some 
> Postgres update problems.
> 
> I used Kyngchaos libraries for all frameworks and Postgres. Now, I'd like to 
> compile PostGIS, in order to get the postgis_restore.pl function.
> 
> I use:
> 
>   export CPPFLAGS=-I/usr/local/pgsql-9.1/include/server 
>   export LDFLAGS=-L/usr/local/pgsql-9.1/lib 
>   export CPATH=/usr/local/pgsql-9.1/include/server/ 
>   export LIBRARY_PATH=/usr/local/pgsql-9.1/lib
> 
> 
> and
> 
>   ./configure --with-pgconfig=/usr/local/pgsql-9.1/bin/pg_config 
> --with-geosconfig=/Library/Frameworks/GEOS.framework/unix/bin/geos-config 
> --with-projdir=/Library/Frameworks/PROJ.framework/unix --with-raster 
> --with-topology 
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> 
> 
> but the making process starts with this:
> 
>  Making all in liblwgeom
> /bin/sh ../libtool --mode=compile gcc -g -O2  -fno-common -DPIC  -Wall 
> -Wmissing-prototypes 
> -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include 
> -I/Library/Frameworks/PROJ.framework/unix/include -c -o stringbuffer.lo 
> stringbuffer.c
> libtool: compile:  gcc -g -O2 -fno-common -DPIC -Wall -Wmissing-prototypes 
> -I/Library/Frameworks/GEOS.framework/Versions/3/unix/include 
> -I/Library/Frameworks/PROJ.framework/unix/include -c stringbuffer.c  
> -fno-common -DPIC -o .libs/stringbuffer.o
> 
> 
> and continues then with this:
> 
>  Making all in postgis
> In file included from /usr/local/pgsql-9.1/include/server/postgres.h:47,
>from postgis_module.c:13:
> /usr/local/pgsql-9.1/include/server/c.h:67:19: error: stdio.h: No such file 
> or directory
> /usr/local/pgsql-9.1/include/server/c.h:68:20: error: stdlib.h: No such file 
> or directory
> /usr/local/pgsql-9.1/include/server/c.h:69:20: error: string.h: No such file 
> or directory
> /usr/local/pgsql-9.1/include/server/c.h:73:21: error: strings.h: No such file 
> or directory
> /usr/local/pgsql-9.1/include/server/c.h:76:20: error: stdint.h: No such file 
> or directory
> /usr/local/pgsql-9.1/include/server/c.h:78:23: error: sys/types.h: No such 
> file or directory
> /usr/local/pgsql-9.1/include/server/c.h:80:19: error: errno.h: No such file 
> or directory
> /usr/local/pgsql-9.1/include/server/c.h:94:20: error: locale.h: No such file 
> or directory
> In file included from /usr/local/pgsql-9.1/include/server/c.h:99,
>from /usr/local/pgsql-9.1/include/server/postgres.h:47,
>from postgis_module.c:13:
> /usr/local/pgsql-9.1/include/server/libintl.h:24:22: error: xlocale.h: No 
> such file or directory
> …
> 
> 
> Any tip is very much appreciated, as I have no idea how to proceed.
> 
> Stefan
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
all for things that the beasts of the jungle would not deign to possess - money 
to purchase the effeminate pleasures of weaklings.  And yet withal bound down 
by silly customs that make them slaves to their unhappy lot while firm in the 
belief that they be the lords of creation enjoying the only real pleasures of 
existence

- the wisdom of Tarzan


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


Re: [postgis-users] OSX PostGIS 9.1 installer not working

2012-05-11 Thread William Kyngesburye
If you are installing my PostGIS, it requires my Postgres package, the one that 
is installed in /usr/local/pgsql-9.x.  I don't support Postgres installed in 
/Library (I think that's the "official" postgres) or Apple's in /usr (new in 
Lion).

On May 11, 2012, at 5:15 PM, Jim deVos wrote:

> I'm unable to successfully run the postgis 9.1 graphical installer on my Mac 
> (OSX 10.6.8).   Whenever I launch the installer it displays the following 
> dialog "PostGIS requires PostgreSQL 9.1."  and then terminates.
> 
> I've confirmed that PostgreSQL 9.1 is installed and appears to be working 
> correctly.  Note that I also have an 8.4 install running also (8.4 runs on 
> the default port 5432, and the v9.1 instance runs on port 5433).  I've tried 
> stopping the 8.4 service and starting the 9.1 instance on the default port, 
> but I still get the error.
> 
> I read a similar thread (issues w/ postgis 9.0 installer)  that claimed that 
> the installer looks for "/usr/local/pgsql-9.0/lib/libpq.5.3.dylib".  I don't 
> have this file (or even this directory) on my machine,  but I do have 
> "/Library/PostgreSQL/9.1/lib/libpq.5.4.dylib", if that matters, and it does 
> appear that my postgresql 9.1 installation is working (i'm able to connect, 
> create tables, etc.).
> 
> Anybody know what I'm doing wrong?
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past 
isn't a fiction designed to account for the discrepancy between my immediate 
physical sensations and my state of mind?"

- The Ruler of the Universe


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


Re: [postgis-users] Is there a homebrew formula for postgis 2.0 ?

2012-03-27 Thread William Kyngesburye
This is what I use (beta 2), given my Postgres and GDAL distributions:

./configure --with-pgconfig=/usr/local/pgsql-9.1/bin/pg_config \
--with-geosconfig=/Library/Frameworks/GEOS.framework/unix/bin/geos-config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix \
--with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config \
--libdir=/usr/local/pgsql-9.1/lib --includedir=/usr/local/pgsql-9.1/include \
--with-raster --with-topology

If you want the new json support, add --with-jsondir= and the path to a json-c 
installation.

On Mar 27, 2012, at 9:47 AM, Gis Mage wrote:

> Hi list!
> 
> I was wondering if there is a homebrew formula formula for postgis 2.0 ?
> Or maybe any OS X user has a quick guide how to compile postgis 2.0
> from source on OS X Lion ?
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] QGIS Plugin PostGIS Manager

2012-01-22 Thread William Kyngesburye
I've been quietly half paying attention to this thread...

I'd rather not promote the environment.plist (or other hidden/system init file 
options) as *the* solution to application environment variables.  Mac users 
shouldn't have to work with invisible files/folders to get something working.  
And I don't think environment.plist is well documented (*users* need to dig 
into the *developer* documentation to find anything).

I also found a reference that PATH set in environment.plist changed in OS X 
10.6 - instead of adding to the default system paths (/usr/bin, /usr/local/bin) 
it completely replaces PATH for any applications (they won't see system paths 
unless you specify them in environment.plist).

Either plugin developers (for plugins that use command line tools) need to add 
program path configuration options (see the GDAL Tools plugin), or some 
QGIS-wide option is needed like http://hub.qgis.org/issues/3097

On Jan 22, 2012, at 11:24 AM, Paolo Cavallini wrote:

> Il 22/01/2012 18:04, Florian Beyerbach ha scritto:
>> hi,
>> 
>> i think, i solved the problem. here the link to the hint:
>> 
>> http://codingdaily.wordpress.com/2010/10/28/how-to-edit-macosxenvironment-plist-from-a-shell/
>> 
>> i did the following
>> 
>> 1. Open up a terminal.
>> 2. |mkdir ~/.MacOSX |
>> 3. |touch ~/.MacOSX/environment.plist|
>> 4. |defaults write ~/.MacOSX/environment
>>PATH |"/usr/local/pgsql/share/contrib/postgis-1.5:/usr/local/pgsql/bin"
>> 5. restart System
>> 6. start QGIS.app
> 
> Hi all.
> Could someone please add these instructions to the plugin help?
> Thanks.
> 
> -- 
> Paolo Cavallini - Faunalia
> www.faunalia.eu
> Full contact details at www.faunalia.eu/pc
> _______
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] When will the PostGIS 2.0 be released?

2011-10-25 Thread William Kyngesburye
1.5.3 + PG 9.1 is working here on OS X.

I think what Paragon was saying is that PostGIS 1.5.3 built for Postgres 9.0 
won't work on Postgres 9.1.  This is generally true on any platform for 
Postgres extensions.

On Oct 25, 2011, at 11:55 AM, Sandro Santilli wrote:

> On Tue, Oct 25, 2011 at 11:44:24AM -0500, Aren Cambre wrote:
>> Isn't the opposite being said here by Paragon staff?
>> http://old.nabble.com/forum/ViewPost.jtp?post=32553824&framed=y
> 
> I don't know, I'm reporting what's being said by the PostGIS source code:
> http://trac.osgeo.org/postgis/browser/tags/1.5.3/NEWS
> 
>   - #940, support for PostgreSQL 9.1 beta 1
> (Regina Obe, Paul Ramsey, patch submitted by stl)
> 
> --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

-
William Kyngesburye 
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no particular 
pleasure I shall kill every ___ I can until the war is over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of the 
allied nations devoted an entire year exclusively to hating the  it 
wouldn't kill one ___ nor shorten the war one day."

 "And it might give 'em all stomach ulcers."

- Tarzan, on war

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


Re: [postgis-users] configure: error: GDAL Python bindings required by raster2pgsql.py loader

2011-10-18 Thread William Kyngesburye
While your GDAL was compiled for a newer numpy, probably in MacPorts, it's 
probably not overriding the numpy in the system (the older one I assume).

A standard numpy install uses the normal python path loading order, and in 
Apple's infinite wisdom (to keep an incompatible version from overriding what's 
in the system, I guess) the user site-packages 
(/Library/Python/x.y/site-packages, including any .pth files in there) is 
searched *after* system packages.  You need a custom .pth file that prepends 
(insert) the numpy path to the sys.path (I do that for my numpy package).

On Oct 18, 2011, at 10:50 AM, Puneet Kishor wrote:

> 
> On Oct 18, 2011, at 8:28 AM, William Kyngesburye wrote:
> 
>> I don't think GDALFPolygonize is the problem, that's just a test for a new 
>> feature in development GDAL and it's OK if it fails.  After that should be 
>> the "checking for GDAL Python bindings" info.
>> ..
> 
> 
> 
> Gah! Dunno what I did, but now GDAL Python bindings are discovered, but seems 
> like I have the wrong version of something.
> 
> RASTER: Raster support requested
> checking for GDAL >= 1.6.0... found
> checking for GDALFPolygonize in -lgdal... no
> checking for GDAL Python bindings... found
> checking for NumPy array support in GDAL Python bindings... RuntimeError: 
> module compiled against API version 6 but this version of numpy is 4
> not found
> configure: error: GDAL Python bindings with NumPy array support required by 
> raster2pgsql.py loader
> 
> 
> 
> 
> 
> I am not sure above what is compiled against API version 6 of what and what 
> is the "this numpy" with version 4. Fwiw
> 
> punkish@mumbai ~$/opt/local/bin/python2.7
> Python 2.7.2 (default, Sep 13 2011, 14:07:58) 
> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy as np
>>>> np.__version__
> '1.6.1'
>>>> 
> 
> 
> 
> --
> Puneet Kishor
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past 
isn't a fiction designed to account for the discrepancy between my immediate 
physical sensations and my state of mind?"

- The Ruler of the Universe


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


Re: [postgis-users] configure: error: GDAL Python bindings required by raster2pgsql.py loader

2011-10-18 Thread William Kyngesburye
I don't think GDALFPolygonize is the problem, that's just a test for a new 
feature in development GDAL and it's OK if it fails.  After that should be the 
"checking for GDAL Python bindings" info.

On Oct 17, 2011, at 10:28 PM, Puneet Kishor wrote:

> 
> On Oct 17, 2011, at 9:22 PM, William Kyngesburye wrote:
> 
>> Try looking in config.log for a more detailed explanation why it couldn't 
>> find GDAL python.
> 
> 
> I see stuff like this...
> 
> configure:19000: result: TOPOLOGY: Topology support requested
> configure:19023: result: RASTER: Raster support requested
> configure:19111: checking for GDAL >= 1.6.0
> configure:19145: result: found
> configure:19148: checking for GDALFPolygonize in -lgdal
> configure:19173: gcc -o conftest -g -O2  -I/opt/local/include 
> -I/opt/local/include -I/opt/local/include/libxml2  conftest.c -lgdal  -lxml2 
> -L/opt/local/lib -lxml2 -lz -lpthread -liconv -lm >&5
> Undefined symbols for architecture x86_64:
>  "_GDALFPolygonize", referenced from:
>  _main in cclcxE0h.o
> ld: symbol(s) not found for architecture x86_64
> 
> and..
> 
> GDALFPOLYGONIZE=''
> GEOSCONFIG='/opt/local/bin/geos-config'
> GEOS_CPPFLAGS='-I/opt/local/include'
> GEOS_LDFLAGS='-L/opt/local/lib'
> 
> and perhaps
> 
> #define HAVE_LIBGEOS_C 1
> #define POSTGIS_GEOS_VERSION 33
> #define HAVE_CFPREFERENCESCOPYAPPVALUE 1
> #define HAVE_CFLOCALECOPYCURRENT 1
> #define POSTGIS_PROJ_VERSION 47
> #define HAVE_LIBPROJ 1
> #define POSTGIS_DEBUG_LEVEL 0
> #define POSTGIS_PROFILE 0
> #define POSTGIS_VERSION "2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"
> #define POSTGIS_LIB_VERSION "2.0.0SVN"
> #define POSTGIS_BUILD_DATE "2011-10-18 02:30:06"
> #define POSTGIS_SCRIPTS_VERSION "2.0 r7940"
> #define POSTGIS_AUTOCACHE_BBOX 1
> #define POSTGIS_USE_STATS 1
> #define POSTGIS_RASTER_MAJOR_VERSION "0"
> #define POSTGIS_RASTER_MINOR_VERSION "1"
> #define POSTGIS_RASTER_MICRO_VERSION "6d"
> #define POSTGIS_RASTER_VERSION "0.1"
> #define POSTGIS_RASTER_LIB_VERSION "0.1.6d"
> #define POSTGIS_RASTER_BUILD_DATE "2011-10-18 02:30:06"
> #define POSTGIS_RASTER_SCRIPTS_VERSION "0.1.6d"
> #define GDALFPOLYGONIZE 0
> 
> 
> Other than that, I can't really tell.
> 
> 
> 
>> 
>> On Oct 17, 2011, at 8:48 PM, Puneet Kishor wrote:
>> 
>>> Any suggestions, anyone? As shown below, I believe I have the Python 
>>> bindings for GDAL installed, yet, I get the following error
>>> 
>>> RASTER: Raster support requested
>>> checking for GDAL >= 1.6.0... found
>>> checking for GDALFPolygonize in -lgdal... no
>>> checking for GDAL Python bindings... not found
>>> configure: error: GDAL Python bindings required by raster2pgsql.py loader
>>> 
>>> I am not quite sure how to convince the .configure script that I do have 
>>> gdal w/Python.
>>> 
>>> 
>>> On Oct 16, 2011, at 2:31 PM, Mr. Puneet Kishor wrote:
>>> 
>>>> From: "Mr. Puneet Kishor" 
>>>> Subject: configure: error: GDAL Python bindings required by 
>>>> raster2pgsql.py loader
>>>> Date: October 16, 2011 2:29:19 PM CDT
>>>> To: PostGIS Users Discussion 
>>>> 
>>>> 
>>>> I believe I did install the GDAL Python bindings (via MacPorts), but my 
>>>> PostGIS 2.0 configure script claims I don't have it. Is there are way I 
>>>> can determine whether or not I have the bindings installed? (I am not 
>>>> Python-savvy) But, I do see stuff like so

-
William Kyngesburye 
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect


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


Re: [postgis-users] configure: error: GDAL Python bindings required by raster2pgsql.py loader

2011-10-17 Thread William Kyngesburye
Try looking in config.log for a more detailed explanation why it couldn't find 
GDAL python.

On Oct 17, 2011, at 8:48 PM, Puneet Kishor wrote:

> Any suggestions, anyone? As shown below, I believe I have the Python bindings 
> for GDAL installed, yet, I get the following error
> 
> RASTER: Raster support requested
> checking for GDAL >= 1.6.0... found
> checking for GDALFPolygonize in -lgdal... no
> checking for GDAL Python bindings... not found
> configure: error: GDAL Python bindings required by raster2pgsql.py loader
> 
> I am not quite sure how to convince the .configure script that I do have gdal 
> w/Python.
> 
> 
> On Oct 16, 2011, at 2:31 PM, Mr. Puneet Kishor wrote:
> 
>> From: "Mr. Puneet Kishor" 
>> Subject: configure: error: GDAL Python bindings required by raster2pgsql.py 
>> loader
>> Date: October 16, 2011 2:29:19 PM CDT
>> To: PostGIS Users Discussion 
>> 
>> 
>> I believe I did install the GDAL Python bindings (via MacPorts), but my 
>> PostGIS 2.0 configure script claims I don't have it. Is there are way I can 
>> determine whether or not I have the bindings installed? (I am not 
>> Python-savvy) But, I do see stuff like so
>> 

-
William Kyngesburye 
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled with hyena 
offal?
Second Pogril: I don't know.  Why IS life like sticking your head in a bucket 
filled with hyena offal?
First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] Error when building from source on mac os x 10.6

2011-10-06 Thread William Kyngesburye

On Oct 6, 2011, at 8:46 AM, Nicolas Ribot wrote:

>> The machine architecture is not the same as what you archs you compile for, 
>> though GCC does default to x86_64.
>> 
>> Anyways...
>> 
>> Did you try setting only "-arch x86_64", without i386?
> 
> Hi,
> Also trying to compile Postgis 2.0 on Mac, I set variable you
> mentioned like this:
> 
> export CFLAGS="-Os -arch x86_64"
> export PG_CPPFLAGS="-arch x86_64"
> export SHLIB_LINK="-arch x86_64"
> export LDFLAGS="-arch x86_64"
> 
> and then:
> 
> But no luck, still the same error message.
> If anybody has clue to share with me, it would be nice
> 
Dunno, something in the configuration of dependencies is all I can think of.

With my Postgres 9.1.1 and current frameworks, this works:

./configure --with-pgconfig=/usr/local/pgsql-9.1/bin/pg_config \
--with-geosconfig=/Library/Frameworks/GEOS.framework/unix/bin/geos-config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix \
--with-raster --with-topology \
--with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config


-
William Kyngesburye 
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no particular 
pleasure I shall kill every ___ I can until the war is over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of the 
allied nations devoted an entire year exclusively to hating the  it 
wouldn't kill one ___ nor shorten the war one day."

 "And it might give 'em all stomach ulcers."

- Tarzan, on war

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


Re: [postgis-users] OSX Server (Lion) link failures with Apple-provided PostgreSQL

2011-09-14 Thread William Kyngesburye
ile was built for 
>> archive which is not the architecture being linked (i386)
>> 
>> On the linking step, I noticed that the architecture flags specify both 32 
>> and 64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to 
>> disable 32 bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 
>> 32+64 bit libraries.
>> 
>> Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
>> makefiles to build liblwgeom as a hybrid?  Thanks much.
>> 
>> -=- Jerry
>> 
>> P.S. I am using GCC version 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1' 
>> which is shipped with Xcode 4.2.
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past 
isn't a fiction designed to account for the discrepancy between my immediate 
physical sensations and my state of mind?"

- The Ruler of the Universe


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


Re: [postgis-users] OSX Server (Lion) linking failures on i386 architecture

2011-09-14 Thread William Kyngesburye
Just point --pgconfig to the Lion postgres.

I know Postgres compiles with the Lion llvm.

Now that I think about it more, you should leave out the 
MACOSX_DEPLOYMENT_TARGET export.  I just tried Postgis (with my Postgres) and 
it compiles.

The Postgis makefiles themselves don't need those env exports, it's the 
Postgres makefile fragments that it includes that do.

On Sep 14, 2011, at 12:50 PM, Jerry Carter wrote:

> This does not work.  There are at least two major variables which have 
> changed in that time.  First, the GCC version has changed.  Second, 
> PostgreSQL is now shipped with Lion Server and may have a different pgxs.mk 
> environment for compilation.
> 
> It looks like environment settings defined before running './configure' are 
> picked up everywhere except for the GNUmakefile postgis target.  Still 
> digging on that.
> 
> -=- Jerry
> 
> 
> On Sep 14, 2011, at 12:57 PM, William Kyngesburye wrote:
> 
>> 2 thoughts:
>> 
>> • See my postgis build instructions.
>> 
>> http://www.kyngchaos.com/macosx/build/postgis
>> 
>> The Snow Leopard instructions should work for Lion.
>> 
>> • I have ready-made packages for Postgres and PostGIS.
>> 
>> On Sep 14, 2011, at 11:16 AM, Jerry Carter wrote:
>> 
>>> 
>>> I'm trying to compile PostGIS 1.5.3 and getting tripped up with 32 vs. 64 
>>> bit.  Following the normal process,
>>> 
>>> cd postgis-1.5.3
>>> ./configure
>>> make
>>> 
>>> compilation proceeds but the link fails.
>>> 
>>> ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
>>> archive which is not the architecture being linked (i386)
>>> 
>>> On the linking step, I noticed that the architecture flags specify both 32 
>>> and 64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to 
>>> disable 32 bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 
>>> 32+64 bit libraries.
>>> 
>>> Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
>>> makefiles to build liblwgeom as a hybrid?  Thanks much.
>>> 
>>> -=- Jerry
>>> 
>>> P.S. I am using GCC version 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1' 
>>> which is shipped with Xcode 4.2.
>>> ___
>>> postgis-users mailing list
>>> postgis-users@postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> 
>> -
>> William Kyngesburye 
>> http://www.kyngchaos.com/
>> 
>> Theory of the Universe
>> 
>> There is a theory which states that if ever anyone discovers exactly what 
>> the universe is for and why it is here, it will instantly disappear and be 
>> replaced by something even more bizarrely inexplicable.  There is another 
>> theory which states that this has already happened.
>> 
>> -Hitchhiker's Guide to the Galaxy 2nd season intro
>> 
>> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


-
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] OSX Server (Lion) linking failures on i386 architecture

2011-09-14 Thread William Kyngesburye
2 thoughts:

• See my postgis build instructions.

http://www.kyngchaos.com/macosx/build/postgis

The Snow Leopard instructions should work for Lion.

• I have ready-made packages for Postgres and PostGIS.

On Sep 14, 2011, at 11:16 AM, Jerry Carter wrote:

> 
> I'm trying to compile PostGIS 1.5.3 and getting tripped up with 32 vs. 64 
> bit.  Following the normal process,
> 
>   cd postgis-1.5.3
>   ./configure
>   make
> 
> compilation proceeds but the link fails.
> 
>   ld: warning: ignoring file ../liblwgeom/liblwgeom.a, file was built for 
> archive which is not the architecture being linked (i386)
> 
> On the linking step, I noticed that the architecture flags specify both 32 
> and 64 bit, i.e. "-arch x86_64 -arch i386", but can't figure out how to 
> disable 32 bit.  I've already rebuilt Proj.4 4.7.0 and GEOS 3.2.2 as hybrid 
> 32+64 bit libraries.
> 
> Any suggestions to either disable 32-bit entirely for PostGIS or to get the 
> makefiles to build liblwgeom as a hybrid?  Thanks much.
> 
> -=- Jerry
> 
> P.S. I am using GCC version 'i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1' 
> which is shipped with Xcode 4.2.
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the 
universe is for and why it is here, it will instantly disappear and be replaced 
by something even more bizarrely inexplicable.  There is another theory which 
states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro


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


Re: [postgis-users] geos 3.3.0 installing problem on Lion

2011-08-01 Thread William Kyngesburye
I was kinda wondering if there was any real problem.  I was compiling with gcc 
4.2 for a while until I became aware of the test problem, and noone complained 
directly about a CoordinateArraySequenceFactory problem with my GEOS framework.

On Aug 1, 2011, at 5:30 PM, Paul Ramsey wrote:

> For whatever it's work (not much) the unit test failure seems to have
> no reported knock-on effects in day-to-day use. So you can use the
> GEOS code compiled with newer gcc without too much trepidation.
> However, no luck in exterminating the test failure thus far.
> 
> P.
> 
> On Mon, Aug 1, 2011 at 2:33 PM, William Kyngesburye
>  wrote:
>> Unfortunately when using GCC 4.2, there is another bug that shows up in the 
>> unit tests:
>> 
>> http://trac.osgeo.org/geos/ticket/299
>> 
>> The only simple solution there is to use gcc-4.0/g++-4.0, BUT Lion Xcode 
>> does not includes this.  The other solution is to compile GEOS *and* 
>> whatever uses GEOS without optimization.
>> 
>> So we're stuck.


-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


Re: [postgis-users] geos 3.3.0 installing problem on Lion

2011-08-01 Thread William Kyngesburye
On Aug 1, 2011, at 4:19 PM, Mr. Puneet Kishor wrote:

> On Aug 2, 2011, at 7:00 AM, Howard Butler wrote:
> 
>> Reported earlier [1].
>> 
>> I spent a little time trying to fix this, but I couldn't come up with a 
>> solution.  
> 
> 
> The following works (the solution was listed in the MacPorts tickets) --
> 
> punkish@Lucknow /opt/local/bin$sudo ./port install geos configure.cc=gcc-4.2 
> configure.cxx=g++-4.2
> --->  Fetching archive for geos
> --->  Fetching geos
> --->  Verifying checksum(s) for geos
> --->  Extracting geos
> --->  Configuring geos
> --->  Building geos
> --->  Staging geos into destroot
> --->  Installing geos @3.3.0_0
> --->  Activating geos @3.3.0_0
> --->  Cleaning geos


Unfortunately when using GCC 4.2, there is another bug that shows up in the 
unit tests:

http://trac.osgeo.org/geos/ticket/299

The only simple solution there is to use gcc-4.0/g++-4.0, BUT Lion Xcode does 
not includes this.  The other solution is to compile GEOS *and* whatever uses 
GEOS without optimization.

So we're stuck.

-
William Kyngesburye 
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the 
universe is for and why it is here, it will instantly disappear and be replaced 
by something even more bizarrely inexplicable.  There is another theory which 
states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro


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


Re: [postgis-users] Error when building from source on mac os x 10.6

2011-07-19 Thread William Kyngesburye
The machine architecture is not the same as what you archs you compile for, 
though GCC does default to x86_64.

Anyways...

Did you try setting only "-arch x86_64", without i386?

P.S. Are you compiling everything yourself for any paricular reason?  Have you 
tried my PostGIS package?

On Jul 19, 2011, at 4:00 AM, Gis Mage wrote:

> Hi, again!
> 
> Thanks for your clues, but that didn't help. 
> I still have the same error.
> I've exported and double checked theese variables.
> I've rebuilt GEOS and PROJ with this flags.
> 
> My arch is:
> uname -m
> x86_64
> 
> I still get the same 
> "ld: symbol(s) not found for architecture i386"
> error.
> 
> But it fires up in a different place now:
> 
>  "_lwline_free", referenced from:
>   _LWGEOM_addpoint in lwgeom_functions_basic.o
>   _LWGEOM_envelope in lwgeom_functions_basic.o
>   _LWGEOM_line_from_mpoint in lwgeom_functions_basic.o
>   _BOX2DFLOAT4_to_LWGEOM in lwgeom_box2dfloat4.o
> ld: symbol(s) not found for architecture i386
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//cccyfTRP.out (No such file or 
> directory)
> make[1]: *** [postgis-2.0.so] Error 1
> make: *** [all] Error 1
> 
> Is there still a library built for a different arch?
> How to check that out? 
> 
> 
> 2011/7/18 William Kyngesburye 
> It looks like the different parts of postgis compilation (ie most of it comes 
> from the Postgres make system) don't have the same information about what 
> architectures to compile for.
> 
> I always specify these before configuring postgis:
> 
> export CFLAGS="-Os -arch i386 -arch x86_64"
> export PG_CPPFLAGS="-arch i386 -arch x86_64"
> export SHLIB_LINK="-arch i386 -arch x86_64"
> export LDFLAGS="-arch i386 -arch x86_64"
> 
> Note that you need to know which architectures GEOS, PROJ and Postgres are 
> compiled for.  Use as many -arch flags in each of the above exports as is 
> common to these.  It may be i386 and x86_64, but it could also be only 
> x86_64.  If i386 is the only common arch, you should recompile to get at 
> least x86_64.
> 
> On Jul 17, 2011, at 11:42 AM, Gis Mage wrote:
> 
> > Hi list!
> > I'm trying to build postgis from source on a snow leopard machine.
> > So I download the 1.5.3 source, configure like this:
> >
> > sudo ./configure --prefix=/opt/postgis 
> > --with-pgconfig=/opt/pgsql/bin/pg_config --mandir=/opt/pgsql/man 
> > --with-geosconfig=/opt/geos/bin/geos-config --with-projdir=/opt/proj
> >
> > and get a successful result:
> >
> >  PostGIS is now configured for x86_64-apple-darwin10.7.0
> >
> >  -- Compiler Info -
> >   C compiler:   gcc -g -O2
> >   C++ compiler: g++ -g -O2
> >
> >  -- Dependencies --
> >   GEOS config:  /opt/geos/bin/geos-config
> >   GEOS version: 3.3.0
> >   PostgreSQL config:/opt/pgsql/bin/pg_config
> >   PostgreSQL version:   PostgreSQL 9.1beta3
> >   PROJ4 version:47
> >   Libxml2 config:   /usr/bin/xml2-config
> >   Libxml2 version:  2.7.3
> >   PostGIS debug level:  0
> >
> >   Documentation Generation 
> >   xsltproc: /usr/bin/xsltproc
> >   xsl style sheets:
> >   dblatex:
> >   convert:
> >
> > Then I do
> > sudo make
> > And get an error:
> >
> >   "_lwline_free", referenced from:
> >   _askml2_inspected_buf in lwgeom_kml.o
> >   _askml2_inspected_size in lwgeom_kml.o
> > ld: symbol(s) not found for architecture i386
> > collect2: ld returned 1 exit status
> > lipo: can't open input file: /var/tmp//ccsIJfa2.out (No such file or 
> > directory)
> > make[1]: *** [postgis-1.5.so] Error 1
> > make: *** [postgis] Error 2
> >
> > So I've checked my /var/tmp dir and I really don't have ccsIJfa2.out file.
> > What am I doing wrong here?
> >

-
William Kyngesburye 
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no particular 
pleasure I shall kill every ___ I can until the war is over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of the 
allied nations devoted an entire year exclusively to hating the  it 
wouldn't kill one ___ nor shorten the war one day."

 "And it might give 'em all stomach ulcers."

- Tarzan, on war

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


Re: [postgis-users] Error when building from source on mac os x 10.6

2011-07-18 Thread William Kyngesburye
It looks like the different parts of postgis compilation (ie most of it comes 
from the Postgres make system) don't have the same information about what 
architectures to compile for.

I always specify these before configuring postgis:

export CFLAGS="-Os -arch i386 -arch x86_64"
export PG_CPPFLAGS="-arch i386 -arch x86_64"
export SHLIB_LINK="-arch i386 -arch x86_64"
export LDFLAGS="-arch i386 -arch x86_64"

Note that you need to know which architectures GEOS, PROJ and Postgres are 
compiled for.  Use as many -arch flags in each of the above exports as is 
common to these.  It may be i386 and x86_64, but it could also be only x86_64.  
If i386 is the only common arch, you should recompile to get at least x86_64.

On Jul 17, 2011, at 11:42 AM, Gis Mage wrote:

> Hi list!
> I'm trying to build postgis from source on a snow leopard machine.
> So I download the 1.5.3 source, configure like this:
> 
> sudo ./configure --prefix=/opt/postgis 
> --with-pgconfig=/opt/pgsql/bin/pg_config --mandir=/opt/pgsql/man 
> --with-geosconfig=/opt/geos/bin/geos-config --with-projdir=/opt/proj
> 
> and get a successful result:
> 
>  PostGIS is now configured for x86_64-apple-darwin10.7.0
> 
>  -- Compiler Info - 
>   C compiler:   gcc -g -O2
>   C++ compiler: g++ -g -O2
> 
>  -- Dependencies -- 
>   GEOS config:  /opt/geos/bin/geos-config
>   GEOS version: 3.3.0
>   PostgreSQL config:/opt/pgsql/bin/pg_config
>   PostgreSQL version:   PostgreSQL 9.1beta3
>   PROJ4 version:47
>   Libxml2 config:   /usr/bin/xml2-config
>   Libxml2 version:  2.7.3
>   PostGIS debug level:  0
> 
>   Documentation Generation  
>   xsltproc: /usr/bin/xsltproc
>   xsl style sheets: 
>   dblatex:  
>   convert:  
> 
> Then I do 
> sudo make
> And get an error:
> 
>   "_lwline_free", referenced from:
>   _askml2_inspected_buf in lwgeom_kml.o
>   _askml2_inspected_size in lwgeom_kml.o
> ld: symbol(s) not found for architecture i386
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//ccsIJfa2.out (No such file or 
> directory)
> make[1]: *** [postgis-1.5.so] Error 1
> make: *** [postgis] Error 2
> 
> So I've checked my /var/tmp dir and I really don't have ccsIJfa2.out file.
> What am I doing wrong here?
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what does that 
remind me of?  Ah, yes - life."

- Marvin


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
Look in config.log for the details about the libxml2 problem.

When configuring with gettext, is the compile error still the same?  Also, look 
farther up the compile output in the Terminal, there should be a more 
meaningful error, like some header not found, and what file is involved.  ie 
for me without gettext, it's:

gcc -Os -arch i386 -arch x86_64  -fno-common -DPIC   -DUSE_NLS 
-DLOCALEDIR=\"/usr/local/pgsql-9.0/share/locale\"   -c shp2pgsql-core.c
In file included from shp2pgsql-core.c:15:
shp2pgsql-core.h:17:21: error: libintl.h: No such file or directory

followed by a bunch of warnings, then the lipo error.

On Mar 18, 2011, at 10:54 AM, Ackbar Joolia wrote:

> Hi William,
> As you have said, its failing when I set the CFLAGS. 
> 
> Sorry I meant to say configure works without the CFLAGS="-Os -arch i386 -arch 
> x86_64", but the make fails.
> 
> using the gettext didn't make any difference, I still get the error:
> checking for xmlInitParser in -lxml2... no
> configure: error: could not find libxml2 
> 
> (btw, I want to get postgis2.0 installed on the snow leopard 10.6 to use the 
> postgis raster)
> 
> 
> 
> On 18 March 2011 15:10, William Kyngesburye  wrote:
> 
> > This is strange, when I use the following command
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > --with-raster --with-topology --disable-nls \
> > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> >
> > without setting the environment variables (the exports),
> 
> Without the *FLAGS, you just get a single-arch build, most likely x86_64 on 
> OSX 10.6.  And most builds default to using the debug flag, so I always set 
> CFLAGS to -Os.
> 
> The deployment target is just something I do and is not critical.
> 
> > the compile works (although the make is still failing),
> 
> Well, make IS the compile.  Or do you mean the configure works?
> 
> Maybe --disable-nls isn't all that's needed - what I actually did was 
> configure for my custom gettext, and assumed that disabling it would work.  I 
> suppose since you have Macports you could try using that - instead of 
> --disable-nls, try:
> 
> --with-gettext=/opt/local
> 
> > but when I use the environment variables, the ./configure fails with this 
> > error:
> > configure: error: could not find libxml2
> >
> > I don't know why it can't find it, when its /opt/local/bin/xml2-config here.
> >
> It should find it from the system, no need for macports.  Though it's 
> possible Macports is confusing the configuration.  Generally, I don't think 
> Macports is automatically checked, it depends on the software.  Straight Gnu 
> configure won't, but some software checks for it.
> 
> > On 18 March 2011 14:26, William Kyngesburye  wrote:
> > On Mar 18, 2011, at 9:13 AM, William Kyngesburye wrote:
> >
> > > On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:
> > >
> > >> How are you configuring PostGIS?  I have build instructions on my site 
> > >> (use the framework alternate at the bottom of the postgis page).  It's 
> > >> more than a simple configure, you need to set some environment variables.
> > >
> > > Of course, those instructions are for 1.5.  For 2.0:
> > >
> > > export MACOSX_DEPLOYMENT_TARGET=10.6
> > > export CFLAGS="-Os -arch i386 -arch x86_64"
> > > export PG_CPPFLAGS="-arch i386 -arch x86_64"
> > > export SHLIB_LINK="-arch i386 -arch x86_64"
> > > export LDFLAGS="-arch i386 -arch x86_64"
> > > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config 
> > > \
> > > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > > --with-raster --with-topology \
> > > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> > >
> > >
> > > So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other 
> > > shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile 
> > > doesn't get any -I flags so it can't find my libintl header.
> > >
> >
> > Got - try configuring without NLS:
> >
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> > --with-projdir=/Library/Frameworks/

Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 9:31 AM, Ackbar Joolia wrote:

> the compile works (although the make is still failing), 

... it looks like the --disable-nls option is broken, it's not disabling it, 
thus the same compile error.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
all for things that the beasts of the jungle would not deign to possess - money 
to purchase the effeminate pleasures of weaklings.  And yet withal bound down 
by silly customs that make them slaves to their unhappy lot while firm in the 
belief that they be the lords of creation enjoying the only real pleasures of 
existence

- the wisdom of Tarzan


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 9:31 AM, Ackbar Joolia wrote:

> This is strange, when I use the following command
> ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> --with-raster --with-topology --disable-nls \
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> 
> without setting the environment variables (the exports),

Without the *FLAGS, you just get a single-arch build, most likely x86_64 on OSX 
10.6.  And most builds default to using the debug flag, so I always set CFLAGS 
to -Os.

The deployment target is just something I do and is not critical.

> the compile works (although the make is still failing),

Well, make IS the compile.  Or do you mean the configure works?

Maybe --disable-nls isn't all that's needed - what I actually did was configure 
for my custom gettext, and assumed that disabling it would work.  I suppose 
since you have Macports you could try using that - instead of --disable-nls, 
try:

--with-gettext=/opt/local

> but when I use the environment variables, the ./configure fails with this 
> error:
> configure: error: could not find libxml2
> 
> I don't know why it can't find it, when its /opt/local/bin/xml2-config here.
> 
It should find it from the system, no need for macports.  Though it's possible 
Macports is confusing the configuration.  Generally, I don't think Macports is 
automatically checked, it depends on the software.  Straight Gnu configure 
won't, but some software checks for it.

> On 18 March 2011 14:26, William Kyngesburye  wrote:
> On Mar 18, 2011, at 9:13 AM, William Kyngesburye wrote:
> 
> > On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:
> >
> >> How are you configuring PostGIS?  I have build instructions on my site 
> >> (use the framework alternate at the bottom of the postgis page).  It's 
> >> more than a simple configure, you need to set some environment variables.
> >
> > Of course, those instructions are for 1.5.  For 2.0:
> >
> > export MACOSX_DEPLOYMENT_TARGET=10.6
> > export CFLAGS="-Os -arch i386 -arch x86_64"
> > export PG_CPPFLAGS="-arch i386 -arch x86_64"
> > export SHLIB_LINK="-arch i386 -arch x86_64"
> > export LDFLAGS="-arch i386 -arch x86_64"
> > ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> > --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> > --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> > --with-raster --with-topology \
> > --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> >
> >
> > So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other 
> > shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile doesn't 
> > get any -I flags so it can't find my libintl header.
> >
> 
> Got - try configuring without NLS:
> 
> ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> --with-raster --with-topology --disable-nls \
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
> 
> "Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
> all for things that the beasts of the jungle would not deign to possess - 
> money to purchase the effeminate pleasures of weaklings.  And yet withal 
> bound down by silly customs that make them slaves to their unhappy lot while 
> firm in the belief that they be the lords of creation enjoying the only real 
> pleasures of existence
> 
> - the wisdom of Tarzan
> 
> 
> 

-
William Kyngesburye 
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and 
always shall be, there is an eternity of time for the accomplishment of 
objects."

- the wisdom of Tarzan





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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 9:13 AM, William Kyngesburye wrote:

> On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:
> 
>> How are you configuring PostGIS?  I have build instructions on my site (use 
>> the framework alternate at the bottom of the postgis page).  It's more than 
>> a simple configure, you need to set some environment variables.
> 
> Of course, those instructions are for 1.5.  For 2.0:
> 
> export MACOSX_DEPLOYMENT_TARGET=10.6
> export CFLAGS="-Os -arch i386 -arch x86_64"
> export PG_CPPFLAGS="-arch i386 -arch x86_64"
> export SHLIB_LINK="-arch i386 -arch x86_64"
> export LDFLAGS="-arch i386 -arch x86_64"
> ./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
> --with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
> --with-projdir=/Library/Frameworks/PROJ.framework/unix \
> --with-raster --with-topology \
> --with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config
> 
> 
> So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other 
> shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile doesn't 
> get any -I flags so it can't find my libintl header.
> 

Got - try configuring without NLS:

./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
--with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix \
--with-raster --with-topology --disable-nls \
--with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config

-
William Kyngesburye 
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and 
all for things that the beasts of the jungle would not deign to possess - money 
to purchase the effeminate pleasures of weaklings.  And yet withal bound down 
by silly customs that make them slaves to their unhappy lot while firm in the 
belief that they be the lords of creation enjoying the only real pleasures of 
existence

- the wisdom of Tarzan


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 8:34 AM, William Kyngesburye wrote:

> How are you configuring PostGIS?  I have build instructions on my site (use 
> the framework alternate at the bottom of the postgis page).  It's more than a 
> simple configure, you need to set some environment variables.

Of course, those instructions are for 1.5.  For 2.0:

export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-Os -arch i386 -arch x86_64"
export PG_CPPFLAGS="-arch i386 -arch x86_64"
export SHLIB_LINK="-arch i386 -arch x86_64"
export LDFLAGS="-arch i386 -arch x86_64"
./configure --with-pgconfig=/usr/local/pgsql-9.0/bin/pg_config \
--with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix \
--with-raster --with-topology \
--with-gdalconfig=/Library/Frameworks/GDAL.framework/Programs/gdal-config


So, lwgeom builds, but I get the error in shp2pgsql-core.c.  The other 
shp2pgsql sources compile.  It looks like shp2pgsql-core.c compile doesn't get 
any -I flags so it can't find my libintl header.

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
On Mar 18, 2011, at 8:40 AM, Nicklas Avén wrote:

> 
>> Does postgis2.0 have dependencies on particular library versions? like geos?
> 
> Yes. You must use latest GEOS trunk with PostGIS trunk.
> 
> I think the latest changes in GEOS needed for PostGIS trunk is less than
> a month old.

Don't know about that - I just compiled with released GEOS 3.2.2 with no errors 
in lwgeom.  It looks like the error is in shp2pgsql, which doesn't need GEOS.

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [postgis-users] postgis 2 installation failing

2011-03-18 Thread William Kyngesburye
How are you configuring PostGIS?  I have build instructions on my site (use the 
framework alternate at the bottom of the postgis page).  It's more than a 
simple configure, you need to set some environment variables.

This sort of error often happens when there was another error earlier in 
compilation that wasn't enough to stop compilation then.

On Mar 18, 2011, at 6:38 AM, AJ7 wrote:

> 
> 
> 
> Mark Cave-Ayland-3 wrote:
>> 
>> 
>> That looks strange. I've only seen similar symptoms before when I've run 
>> out of memory/disk space when attempting a build.
>> 
>> 
>> ATB,
>> 
>> Mark.
>> 
> hi mark, I have got more than enough disk space, and i have tried rebooting
> my machine several time in case it was out of memorybut still get the
> problem. 
> 
> Does postgis2.0 have dependencies on particular library versions? like geos?
> 
> -- 
> View this message in context: 
> http://old.nabble.com/postgis-2-installation-failing-tp31153068p31180402.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

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [postgis-users] raster2pgsql vs gdal2wktraster ...can someone clarify?

2011-03-14 Thread William Kyngesburye
On Mar 14, 2011, at 10:38 AM, Pierre Racine wrote:

>> So would you advise me to get postgis from the trunk, and compile the
>> source, or its fine to work with the version from kyngchaos for now?
> 
> Depends if what you want to do is included or/and working fine in this 
> version. The last version is always better.
> 
Just remember that trunk (2.0/SVN) is in development, though I don't know how 
stable it is.  There may be other problems.  Last version *may* be better ;)


-
William Kyngesburye 
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the 
universe is for and why it is here, it will instantly disappear and be replaced 
by something even more bizarrely inexplicable.  There is another theory which 
states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro


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


Re: [postgis-users] Problem with WKTRaster: cannot get raster type in database

2011-03-11 Thread William Kyngesburye
Just trying to figure out where the problem is happening (internally) - did the 
error have the postgres version in the error message for the path to 
rtpostgis.sql?

Are you having any problems with PostGIS?  PostGIS and WKTraster are build 
exactly the same way and the SQL setup operates the same ($libdir/...).

On Mar 11, 2011, at 1:11 PM, AJ7 wrote:

> 
> sorry - meant to add that the command didn't work (got the same errors)
> 
> 
> William Kyngesburye wrote:
>> 
>> On Mar 11, 2011, at 11:05 AM, AJ7 wrote:
>> 
>>> 
>>> Hi William,
>>> I also think it might be a linking or not finding path issue. When I
>>> remove
>>> the $libdir in rtpostgis.sql and put the full path where the rtpostgis.so
>>> is, it seems to want to do it, but i didnt want to substitute all...
>>> 
>> Try running the psql command as I specified below - does that work?
>> 
>>> Is there a way that I can change $libdir to point to /usr/local/pgsql/lib
>>> instead of /usr/local/pgsql-9.0/lib?
>>> 
>> That should not be necessary.
>> 
>>> Pierre,
>>> I don't have the libgdal.so
>>> 
>> And you shouldn't.
>> 
>>> 
>>> 
>>> William Kyngesburye wrote:
>>>> 
>>>> GDAL shouldn't be the problem.  This is OS X, and GDAL is a framework,
>>>> so
>>>> you won't see a library file in Postgres lib/ or /usr/local/lib. 
>>>> rtpostgis.so is properly linked to the GDAL framework.
>>>> 
>>>> It looks to me like it's /usr/local/pgsql but can't handle the symlink
>>>> to
>>>> /usr/local/pgsql-9.0.  Or it doesn't like the mismatch?  What about
>>>> this:
>>>> 
>>>> su - postgres -c '/usr/local/pgsql-9.0/bin/psql -p 5433 -d [dbname] -f
>>>> /usr/local/pgsql-9.0/share/contrib/rtpostgis.sql'
>>>> 
>>>> On Mar 11, 2011, at 10:35 AM, Pierre Racine wrote:
>>>> 
>>>>> Well I can't open those .dmg files. The only important thing is that
>>>>> the
>>>>> gdal library is beside the rtpostgis.so library and is named libgdal.so
>>>>> 
>>>>> Do you have that?
>>>>> 
>>>>>> -Original Message-
>>>>>> From: postgis-users-boun...@postgis.refractions.net
>>>>>> [mailto:postgis-users-
>>>>>> boun...@postgis.refractions.net] On Behalf Of AJ7
>>>>>> Sent: 11 mars 2011 11:23
>>>>>> To: postgis-users@postgis.refractions.net
>>>>>> Subject: Re: [postgis-users] Problem with WKTRaster: cannot get raster
>>>>>> type in database
>>>>>> 
>>>>>> 
>>>>>> Hi Pierre
>>>>>> I installed from here:http://www.kyngchaos.com/software/postgres
>>>>>> 
>>>>>> I already had GDAL 1.8 complete installed on my machine, so didn't
>>>>>> bother
>>>>>> installing again. (all the installations from the link above worked
>>>>>> fine).
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Pierre Racine-2 wrote:
>>>>>>> 
>>>>>>> Is there any way I can see the list of file included in your
>>>>>>> kyngchaos
>>>>>>> package?
>>>>>>> 
>>>>>>> libgdal is the base GDAL library. rtpostgis.so is dependent on it and
>>>>>>> should be able to find it in the same folder or any lib search
>>>>>>> folder.
>>>>>>> 
>>>>>>> Pierre
>>>>>>> 
>>>>>>>> -Original Message-
>>>>>>>> From: postgis-users-boun...@postgis.refractions.net
>>>>>>>> [mailto:postgis-users-
>>>>>>>> boun...@postgis.refractions.net] On Behalf Of AJ7
>>>>>>>> Sent: 11 mars 2011 11:17
>>>>>>>> To: postgis-users@postgis.refractions.net
>>>>>>>> Subject: Re: [postgis-users] Problem with WKTRaster: cannot get
>>>>>>>> raster
>>>>>> type in database
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Yes I do have the rtpostgis.so file in "usr/local/pgsql-9.0/lib",
>>>>>>>> but
>>>&

Re: [postgis-users] Problem with WKTRaster: cannot get raster type in database

2011-03-11 Thread William Kyngesburye
On Mar 11, 2011, at 11:05 AM, AJ7 wrote:

> 
> Hi William,
> I also think it might be a linking or not finding path issue. When I remove
> the $libdir in rtpostgis.sql and put the full path where the rtpostgis.so
> is, it seems to want to do it, but i didnt want to substitute all...
> 
Try running the psql command as I specified below - does that work?

> Is there a way that I can change $libdir to point to /usr/local/pgsql/lib
> instead of /usr/local/pgsql-9.0/lib?
> 
That should not be necessary.

> Pierre,
> I don't have the libgdal.so
> 
And you shouldn't.

> 
> 
> William Kyngesburye wrote:
>> 
>> GDAL shouldn't be the problem.  This is OS X, and GDAL is a framework, so
>> you won't see a library file in Postgres lib/ or /usr/local/lib. 
>> rtpostgis.so is properly linked to the GDAL framework.
>> 
>> It looks to me like it's /usr/local/pgsql but can't handle the symlink to
>> /usr/local/pgsql-9.0.  Or it doesn't like the mismatch?  What about this:
>> 
>> su - postgres -c '/usr/local/pgsql-9.0/bin/psql -p 5433 -d [dbname] -f
>> /usr/local/pgsql-9.0/share/contrib/rtpostgis.sql'
>> 
>> On Mar 11, 2011, at 10:35 AM, Pierre Racine wrote:
>> 
>>> Well I can't open those .dmg files. The only important thing is that the
>>> gdal library is beside the rtpostgis.so library and is named libgdal.so
>>> 
>>> Do you have that?
>>> 
>>>> -Original Message-
>>>> From: postgis-users-boun...@postgis.refractions.net
>>>> [mailto:postgis-users-
>>>> boun...@postgis.refractions.net] On Behalf Of AJ7
>>>> Sent: 11 mars 2011 11:23
>>>> To: postgis-users@postgis.refractions.net
>>>> Subject: Re: [postgis-users] Problem with WKTRaster: cannot get raster
>>>> type in database
>>>> 
>>>> 
>>>> Hi Pierre
>>>> I installed from here:http://www.kyngchaos.com/software/postgres
>>>> 
>>>> I already had GDAL 1.8 complete installed on my machine, so didn't
>>>> bother
>>>> installing again. (all the installations from the link above worked
>>>> fine).
>>>> 
>>>> 
>>>> 
>>>> Pierre Racine-2 wrote:
>>>>> 
>>>>> Is there any way I can see the list of file included in your kyngchaos
>>>>> package?
>>>>> 
>>>>> libgdal is the base GDAL library. rtpostgis.so is dependent on it and
>>>>> should be able to find it in the same folder or any lib search folder.
>>>>> 
>>>>> Pierre
>>>>> 
>>>>>> -Original Message-
>>>>>> From: postgis-users-boun...@postgis.refractions.net
>>>>>> [mailto:postgis-users-
>>>>>> boun...@postgis.refractions.net] On Behalf Of AJ7
>>>>>> Sent: 11 mars 2011 11:17
>>>>>> To: postgis-users@postgis.refractions.net
>>>>>> Subject: Re: [postgis-users] Problem with WKTRaster: cannot get raster
>>>> type in database
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Yes I do have the rtpostgis.so file in "usr/local/pgsql-9.0/lib", but
>>>>>> I
>>>>>> don't have any libgdal. where should I get this from? Is this why its
>>>>>> not
>>>>>> working?
>>>>>> 
>>>>>> 
>>>>>> Pierre Racine-2 wrote:
>>>>>>> 
>>>>>>> Do you have the "rtpostgis" shared library in
>>>>>>> "usr/local/pgsql-9.0/lib"?
>>>>>>> There should be "libgdal" as well.
>>>>>>> 
>>>>>>> Pierre
>>>>>>> 
>>>>>>>> -Original Message-
>>>>>>>> From: postgis-users-boun...@postgis.refractions.net
>>>> [mailto:postgis-users-
>>>>>>>> boun...@postgis.refractions.net] On Behalf Of AJ7
>>>>>>>> Sent: 11 mars 2011 07:02
>>>>>>>> To: postgis-users@postgis.refractions.net
>>>>>>>> Subject: [postgis-users] Problem with WKTRaster: cannot get raster
>>>>>>>> type
>>>> in
>>>>>> database
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Hi,
>>>>>>>> I installed postgis1.5 and 

Re: [postgis-users] Problem with WKTRaster: cannot get raster type in database

2011-03-11 Thread William Kyngesburye
local/pgsql-9.0/lib
>>>>>> pg_config --pkglibdir -> usr/local/pgsql-9.0/lib
>>>>>> 
>>>>>> really need help on this.Hope its a simple thing.
>>>>>> thanks
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> View this message in context:
>>>> http://old.nabble.com/Problem-with-WKTRaster%3A-cannot-get-raster-type-
>>>>>> in-database-tp31124425p31124425.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
>>>>> 
>>>>> 
>>>> 
>>>> --
>>>> View this message in context:
>> http://old.nabble.com/Problem-with-WKTRaster%3A-cannot-get-raster-type-
>>>> in-database-tp31124425p31126445.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
>>> 
>>> 
>> 
>> --
>> View this message in context: 
>> http://old.nabble.com/Problem-with-WKTRaster%3A-cannot-get-raster-type-
>> in-database-tp31124425p31126499.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

-
William Kyngesburye 
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no particular 
pleasure I shall kill every ___ I can until the war is over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of the 
allied nations devoted an entire year exclusively to hating the  it 
wouldn't kill one ___ nor shorten the war one day."

 "And it might give 'em all stomach ulcers."

- Tarzan, on war

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


Re: [postgis-users] user postgres fiasco(?) on Mac OS X 10.6.6

2011-03-05 Thread William Kyngesburye
My PostGIS distribution is made for my Postgres distribution.  It will not 
install for the EnterpriseDB distribution, and even if you could extract 
PostGIS and install it where EnterpriseDB wants it, it probably won't work.

I think they have a build of PostGIS that works with their Postgres.

On Mar 5, 2011, at 6:14 PM, Rosemary Alles wrote:

> I believe I figured it out, the Mac OS X install wiz for postgresql defaults 
> to /Library/PostgreSQL/ (which I accepted) and the install wiz for postgis 
> appears to *only* look in /usr/local/ to determine if postgresql has 
> *already* been installed, hence one of two things must happen:
>   • postgresql installing *must* happen in /usr/local or
>   • create a symbolic link from /usr/local to where the preferred 
> installation location (for postgresql) and the installation for postgis 
> follows without a problem (without which it fails complaining it needs 
> postgresql.)
>   • Is this is a simple matter of un-tarring a compressed file, - then no 
> biggie anyway... 
> Thanks for your help,
> rosemary.
> 
> On Sat, Mar 5, 2011 at 3:30 PM, Rosemary Alles  
> wrote:
> Thanks William.
> 
> I redid the installation (by *actually* reading the readme -duh- and things 
> appear to be working).
> 
> The installation, uses an install wiz which asks for the password, etc. 
> (system password for the user postgres vs the db password) - the installation 
> proceeds ok as long as shared mem has been set (as required) and the system 
> rebooted to register the change *prior* to installation.
> 
> Anyway, I need to install PostGIS on top of this, and wonder where (which 
> directory under /Library/PostgreSQL/9.0/ I should untar the PostGIS binaries 
> from: http://www.kyngchaos.com/software:postgres? 
> 
> Thanks much,
> rosemary.
> 
> 
> On Sat, Mar 5, 2011 at 8:54 AM, William Kyngesburye  
> wrote:
> On Mar 5, 2011, at 4:38 AM, Rosemary Alles wrote:
> 
> > Hullo all,
> >
> > After running around in circles for a bit, I decide I would ask. The 
> > installation of PostgreSQL from 
> > http://www.enterprisedb.com/products-services-training/pgdownload#osx 
> > apparently created a user "postgres" (with no home directory - but that's 
> > ok) and if there's a password (maybe there isn't one?) then I have no idea 
> > what it is... I had to enable root to get into the data directory (su - 
> > postgress), now I'm assuming I have to edit pg_hba.conf (to change/set the 
> > password - authenticate users/roles) before I can do anything else?
> >
> This is normal.  (I *do* have this info in my Postgres distribution)  There 
> is no password, but it's a special null password, not an empty password, so 
> it can't be used to login to anything.  It's a user solely used for running 
> Postgres.  But you can force authentication (for editing the config files) 
> with root.
> 
> 
> > Still, the current config is as follows, which appears to grant access to 
> > "all" w/trust? If so, why am I getting an error upon trying to create a DB 
> > as myself/admin?
> >
> > # TYPE  DATABASEUSERCIDR-ADDRESSMETHOD
> > # "local" is for Unix domain socket connections only
> > local   all all trust
> > # IPv4 local connections:
> > hostall all 127.0.0.1/32trust
> > # IPv6 local connections:
> > hostall all ::1/128 trust
> >
> > error:
> > createdb: could not connect to database postgres: FATAL:  role 
> > "whatever_name" does not
> >
> > exist
> >
> Have you set up any postgres users, "roles", yet?  Postgres doesn't use 
> system users.  A "postgres" role is created on initialization (independent of 
> the system postgres user).  Use that to create other roles and to manage 
> other stuff.
> 
> 
> Check the Postgres documentation and other help resources for more details.  
> My Postgres distribution has some basics, to get people started.
> 
> 
> >  Any help is good,
> > rosemary.
> >
> >
> > ___
> > postgis-users mailing list
> > postgis-users@postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> -
> William Kyngesburye 
> http://www.kyngchaos.com/
> 
> The equator is so long, it could encircle the earth completely once.
> 
> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] user postgres fiasco(?) on Mac OS X 10.6.6

2011-03-05 Thread William Kyngesburye
On Mar 5, 2011, at 4:38 AM, Rosemary Alles wrote:

> Hullo all,
> 
> After running around in circles for a bit, I decide I would ask. The 
> installation of PostgreSQL from 
> http://www.enterprisedb.com/products-services-training/pgdownload#osx 
> apparently created a user "postgres" (with no home directory - but that's ok) 
> and if there's a password (maybe there isn't one?) then I have no idea what 
> it is... I had to enable root to get into the data directory (su - 
> postgress), now I'm assuming I have to edit pg_hba.conf (to change/set the 
> password - authenticate users/roles) before I can do anything else?
> 
This is normal.  (I *do* have this info in my Postgres distribution)  There is 
no password, but it's a special null password, not an empty password, so it 
can't be used to login to anything.  It's a user solely used for running 
Postgres.  But you can force authentication (for editing the config files) with 
root.


> Still, the current config is as follows, which appears to grant access to 
> "all" w/trust? If so, why am I getting an error upon trying to create a DB as 
> myself/admin? 
> 
> # TYPE  DATABASEUSERCIDR-ADDRESSMETHOD
> # "local" is for Unix domain socket connections only
> local   all all trust
> # IPv4 local connections:
> hostall all 127.0.0.1/32trust
> # IPv6 local connections:
> hostall all ::1/128 trust
> 
> error:
> createdb: could not connect to database postgres: FATAL:  role 
> "whatever_name" does not
> 
> exist
> 
Have you set up any postgres users, "roles", yet?  Postgres doesn't use system 
users.  A "postgres" role is created on initialization (independent of the 
system postgres user).  Use that to create other roles and to manage other 
stuff.


Check the Postgres documentation and other help resources for more details.  My 
Postgres distribution has some basics, to get people started.


>  Any help is good, 
> rosemary.
> 
> 
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


Re: [postgis-users] Shared memory extesion on a a Mac for PostgreSQL/PostGIS

2011-03-04 Thread William Kyngesburye

On Mar 4, 2011, at 4:07 PM, Ture Pålsson wrote:

> 2011/3/4 Rosemary Alles :
>> Hullo all,
>> 
>> I'm attempting to store several sets of GPS derived spatial data (simple
>> lat/lon mostly) in PostGIS and have hence installed PostgreSQL with the
>> PostGIS extension on my iMac (running 10.6.6), the readme that comes with
>> the PostgreSQL (at least for the latest version of it) casually warns of the
>> need to increase -significantly- the amounts of shared memory availalbe for
>> use. (See "attached" readme) Has anyone done this and what are the risks?
> 
> I played around with that a few months ago, and with my test case,
> pulling an Openstreetmap extract of Sweden into the database on a 2
> GByte iMac, I could not get any measurable performance improvement by
> increasing Postgres's shared-memory parameters. It seems that the
> OS-level buffer cache is doing a decent job. The obvious criticism
> against this test case is that it has a single database "user"
> executing a few large transactions which may not be a realistic
> scenario. Then again, I don't think there are any major risks changing
> the system coniguration as long as you stick to the recommended values
> and always think twice before hitting "return".

It's not really a "warning" about any potential problem.  It's an installation 
recommendation/requirement.  With the OS X defaults the Postgres server may not 
run at all, especially with large and/or many databases, and on 64bit 
processors.  It doesn't hurt the system.

Odd, I thought I had that info in my package readme.  I'll have to dig through 
my memory and notes to see why I removed it, or if it was accidental.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect


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


Re: [postgis-users] cant find shp2pgsql on mac osx

2011-02-25 Thread William Kyngesburye
It should be in the Postgres bin/ folder.  If you're using my PostGIS 9 
package, that's /usr/local/pgsql-9.0/bin.

On Feb 25, 2011, at 10:08 AM, Rhys A.D. Stewart wrote:

> Greetings!!!
> 
> not finding shp2pgsql et al on my mac if someone can point me
> in the right direction I'd be more than happy...
> .....thanks...
> 

-
William Kyngesburye 
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the 
universe is for and why it is here, it will instantly disappear and be replaced 
by something even more bizarrely inexplicable.  There is another theory which 
states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro


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


Re: [postgis-users] Kyng chaos Postgis -- "PostGIS requires PostgreSQL 9.0."

2010-12-13 Thread William Kyngesburye
On Dec 13, 2010, at 2:15 PM, fork wrote:

>> That looks like it's straight from my OS X installer, so PostGIS itself 
>> hasn't tried to run yet.
>> 
>> The installer checks for the existence of 
>> /usr/local/pgsql-9.0/lib/libpq.5.3.dylib.  Are you sure the Postgres install 
>> finished and succeeded?
> 
> Yes, but it installs as an app, not in that directory
> 
Ah, my Postgres installer does not install as an application.  And my PostGIS 
package only supports my Postgres package (or other Postgres built from source 
in the standard way in /usr/local/pgsql-9.0).

>> Is this a new install or upgrade of Postgres/PostGIS?
> 
> New, and I *think* i used your binary.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what does that 
remind me of?  Ah, yes - life."

- Marvin


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


Re: [postgis-users] Kyng chaos Postgis -- "PostGIS requires PostgreSQL 9.0."

2010-12-13 Thread William Kyngesburye
On Dec 13, 2010, at 5:06 AM, Mark Cave-Ayland wrote:

> fork wrote:
> 
>> Hi all,
>> Not sure where else to ask -- I just installed Postgresql 9.0.1 from
>> the Kyngesbury site, now trying to install postgis, and I get this
>> error:
>> "PostGIS requires PostgreSQL 9.0."
>> Anyone have any ideas?  Does this mean "I can't find any postgres"? or
>> "I can't find the right version" or ???
>> Thanks!
> 
> There was a bug in PostGIS 1.5.1 that would probably cause this error 
> (related to the change in version number from PostgreSQL 8.5 to 9.0). Can you 
> confirm that you are using PostGIS 1.5.2?
> 
That looks like it's straight from my OS X installer, so PostGIS itself hasn't 
tried to run yet.

The installer checks for the existence of 
/usr/local/pgsql-9.0/lib/libpq.5.3.dylib.  Are you sure the Postgres install 
finished and succeeded?

Is this a new install or upgrade of Postgres/PostGIS?

-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those least suited 
to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] Can't find postgis-1.4.so?

2010-08-23 Thread William Kyngesburye
On Aug 23, 2010, at 5:16 PM, Nathan Odgers wrote:

> ERROR:  could not load library 
> "/Library/PostgresPlus/8.4SS/lib/postgis-1.4.so": 
> dlopen(/Library/PostgresPlus/8.4SS/lib/postgis-1.4.so, 10): Library not 
> loaded: 
> /Users/buildfarm/pginstaller/PostGIS/caching/osx/proj-4.6.1.osx/lib/libproj.0.dylib
>   Referenced from: /Library/PostgresPlus/8.4SS/lib/postgis-1.4.so
>   Reason: image not found
> CONTEXT:  SQL function "geomfromtext" statement 1

Looks like they forgot a packaging step to tell postgis-1.4.so where libproj 
really is in the installed Postgres.  You should take this to EnterpriseDB.

-
William Kyngesburye 
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past 
isn't a fiction designed to account for the discrepancy between my immediate 
physical sensations and my state of mind?"

- The Ruler of the Universe


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


Re: [postgis-users] OS X WKTRaster installer now available

2010-08-01 Thread William Kyngesburye
P.S.  OK, I didn't notice that the source download is a snapshot, and always 
named '0.1.6d'.  So, that first one was r5720.  r5759 installer will be ready 
soon, and I'll try to do a weekly build unless a major fix (and I notice it) 
needs a quicker build.

Just watch for updates on my Postgres download page ;)

On Jul 21, 2010, at 7:52 PM, William Kyngesburye wrote:

> OK, here you go!  Ready to use with my Postgres/PostGIS packages.  Sorry, I 
> haven't done any testing.
> 
> http://www.kyngchaos.com/software/postgres
> 

-
William Kyngesburye 
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an illusion 
caused by the passage of history."

- Hitchhiker's Guide to the Galaxy


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


[postgis-users] OS X WKTRaster installer now available

2010-07-21 Thread William Kyngesburye
OK, here you go!  Ready to use with my Postgres/PostGIS packages.  Sorry, I 
haven't done any testing.

http://www.kyngchaos.com/software/postgres

-
William Kyngesburye 
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the 
universe is for and why it is here, it will instantly disappear and be replaced 
by something even more bizarrely inexplicable.  There is another theory which 
states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro


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


Re: [postgis-users] WKT raster installation on Mac Snow Leopard

2010-07-21 Thread William Kyngesburye
I should be able to get a wktraster installer ready soon.

Sorry, but I won't be supporting other Postgres distributions.  Too much 
variation in the installation methods and layout, even some that try to be 
Mac-like, which really isn't appropriate for server software, especially one 
like Postgres which is very particular about file permissions.

With the EnterpriseDB installer I couldn't tell - it uses a 3rd party 
installer, so I can't poke into the contents without installing it, and I don't 
like installing new unknown software where I have no clue what it's going to 
do.  Also, I see that they don't have a 64bit version.

But, my postgis (& future wktraster) should install and run on any default 
installation of Postgres (/usr/local/pgsql) of the version it was built for.  
If you can figure out where files need to be on some other insallation, it's 
possible my binaries could run on a matching Postgres version - you could 
extract the files from my installers and copy them to the other postgres 
(Pacifist can open OSX flat packages).

On Jul 21, 2010, at 9:45 AM, Shaun Langley wrote:

> I want to put my vote in for a MacOS package.  I spent several weeks
> trying to correctly identify the paths without success.  From what I
> can tell, the problem is not having a lot of the dependencies through
> various dev packages.  When I finally got around to getting it
> compiled in Ubuntu, I spent quite a while installing "other" things to
> get all the dependencies satisfied.  But at least I was prompted
> during the config stage as to what the necessary steps were.  If you
> can also get the packaged to interface with the enterprisedb version
> of postgres (vastly different paths from the Kyngchaos one) you'll
> open the project up to a whole suite of others!  You may even get some
> publicity/support from enterprisedb themselves.
> 
> Regards,
> Shaun
> --
> Shaun Langley
> Graduate Student, PhD
> Department of Geography
> Michigan State University
> Home: (517) 974-9346
> 
> 
> 
> 
> On Wed, Jul 21, 2010 at 9:14 AM, Javier de la Torre
>  wrote:
>> Thanks William!
>> 
>>>> I have tried downloading the same version of PostGIS code that I have 
>>>> installed via Kyngchaos and use it to compile WKT raster. I had to copy 
>>>> config.sub and config.guess because it was complaining and then I ran:
>>>> 
>>> Odd.  The included config.sub/guess work for me.
>>> 
>> 
>> That was on WKT raster not postgis.
>> 
>>> 
>>> 
>>> ... hmm, it seems there is some interest in WKTraster on OS X... maybe it's 
>>> time for a new package...
>>> 
>> 
>> That would be awesome!! Right now I am evaluating possibilities but later if 
>> we include it in a development will be nice to have a binary to let 
>> developers install everything easily. I volunteer myself to take care of it, 
>> but your website is the reference for downloading postgis binaries for mac 
>> os x! So ideally should be there.
>> 
>> 
>> Javier.
>> www.vizzuality.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

-
William Kyngesburye 
http://www.kyngchaos.com/

"The beast is actively interested only in now, and, as it is always now and 
always shall be, there is an eternity of time for the accomplishment of 
objects."

- the wisdom of Tarzan





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


Re: [postgis-users] WKT raster installation on Mac Snow Leopard

2010-07-20 Thread William Kyngesburye

On Jul 20, 2010, at 2:54 PM, P Kishor wrote:

> On Tue, Jul 20, 2010 at 2:38 PM, William Kyngesburye
>  wrote:
>> export CFLAGS="-Os -arch i386 -arch x86_64"
>> export PG_CPPFLAGS="-arch i386 -arch x86_64"
> 
> 
> Does that build for both 32 and 64 bit? If I leave out the above
> flags, the default build on Snow Leopard should be 64 bit, no?

I don't remember exactly why I set those, possibly early issues now non-issues 
with the pgxs makefile setup, but I think there may be a problem if they don't 
agree with what's already in the pgxs makefiles (both archs as I've distributed 
Postgres).

-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those least suited 
to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] WKT raster installation on Mac Snow Leopard

2010-07-20 Thread William Kyngesburye

On Jul 20, 2010, at 2:11 PM, Javier de la Torre wrote:

> I have tried downloading the same version of PostGIS code that I have 
> installed via Kyngchaos and use it to compile WKT raster. I had to copy 
> config.sub and config.guess because it was complaining and then I ran:
> 
Odd.  The included config.sub/guess work for me.

> ./configure --with-postgis-sources=/Users/jatorre/workspace/postgis-1.5.1/ 
> --with-pgconfig=/usr/local/pgsql/bin/pg_config 
> --with-gdal=/Library/Frameworks/GDAL.framework/unix/bin/gdal-config 
> --with-geos=/Library/Frameworks/GEOS.framework/unix/bin/geos-config
> 
> But the error I get is:
> 
> ld: symbol(s) not found for architecture i386
> collect2: ld returned 1 exit status
> ld: warning: directory '/Users/Shared/unix/gettext-snow/lib' following -L not 
> found

Looks like I forgot to clean part of the Postgres installation before packaging 
it up.  That's a local library that I bundle in the Postgres distribution.  
Watch my site for an update...

> If I try to compile postgis I get the same error.
> 
> I took a look at how the sources from kyngchaos were created 
> (http://www.kyngchaos.com/macosx/build/postgis) but they are not up to date 
> with Snow Leopard.

Yes, I've been lazy here ;)

postgis:

export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-Os -arch i386 -arch x86_64"
export PG_CPPFLAGS="-arch i386 -arch x86_64"
export SHLIB_LINK="-arch i386 -arch x86_64"
export LDFLAGS="-arch i386 -arch x86_64"
./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config \
--with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos-config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix

wktraster:

export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-Os -arch i386 -arch x86_64"
export PG_CPPFLAGS="-arch i386 -arch x86_64"
export SHLIB_LINK="-arch i386 -arch x86_64"
export LDFLAGS="-arch i386 -arch x86_64"
./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config \
--with-gdal=/Library/Frameworks/GDAL.framework/Programs/gdal-config \
--with-geos=/Library/Frameworks/GEOS.framework/Programs/geos-config \
--with-postgis-sources=/Users/jatorre/workspace/postgis-1.5.1


... hmm, it seems there is some interest in WKTraster on OS X... maybe it's 
time for a new package...

-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


Re: [postgis-users] WKT raster installation on mac

2010-07-07 Thread William Kyngesburye
The 'libpq' that it's not finding is lib/libpq.dylib, not include/libpq (which 
is a folder).  So, the libdir option (or lack of) should be OK.

I find that sometimes other unrelated things affect configure detection.  In 
the wktraster source folder you should have a config.log, look there for more 
details on why it failed to find libpq.

(No problems here configuring wktraster on OS X with my own Postgres and 
Postgis binaries.)

On Jul 7, 2010, at 11:08 AM, Shaun Langley wrote:

> I'm still getting stuck with this installation.  I specified the libdir, but 
> note that libpq is not in this directory.  The path for libpq is 
> "/Library/PostgreSQL/8.4/include" which is distinct from the other code 
> libraries in "/Library/PostgreSQL/8.4/lib"  I'm copying the directory 
> contents so you can clearly see what's included in each.
> 
> configure: error: could not find libpq
> user-d0c71a:wktraster-0.1.6d langleys$ cd ../include/
> user-d0c71a:include langleys$ ls
> ecpg_config.h pg_config.h pgtypes_numeric.h
> ecpg_informix.h   pg_config_i386.hpgtypes_timestamp.h
> ecpgerrno.h   pg_config_manual.h  postgres_ext.h
> ecpglib.h pg_config_os.h  postgresql
> ecpgtype.hpg_config_ppc.h sql3types.h
> libpq pgtypes_date.h  sqlca.h
> libpq-events.hpgtypes_error.h
> libpq-fe.hpgtypes_interval.h
> user-d0c71a:include langleys$ 
> 
> user-d0c71a:include langleys$ cd ../lib
> user-d0c71a:lib langleys$ ls
> libecpg.6.1.dylib libpq.dylib
> libecpg.6.dylib   libproj.0.5.5.dylib
> libecpg.a libproj.0.dylib
> libecpg.dylib libproj.dylib
> libecpg_compat.3.1.dylib  libuuid.16.dylib
> libecpg_compat.3.dyliblibuuid.a
> libecpg_compat.a  libuuid.dylib
> libecpg_compat.dylib  libuuid.la
> libgeos-3.2.0.dylib   libxml2.2.7.1.dylib
> libgeos.dylib libxml2.2.dylib
> libgeos_c.1.6.0.dylib libxml2.a
> libgeos_c.1.dylib libxml2.dylib
> libgeos_c.dylib   libxml2.la
> libpgport.a   libxslt.1.1.23.dylib
> libpgtypes.3.1.dylib  libxslt.1.dylib
> libpgtypes.3.dyliblibxslt.a
> libpgtypes.a  libxslt.dylib
> libpgtypes.dylib  libxslt.la
> libpq.5.2.dylib   postgis-1.4.so
> libpq.5.dylib postgresql
> libpq.a
> user-d0c71a:lib langleys$ 
> 
> on the first line, you can clearly see that no matter which path I select for 
> "libdir" the configure script cannot find "libpq".  Any ideas?
> 
> Regards,
> Shaun
> 
> 
> On Jul 6, 2010, at 5:51 AM, Jorge Arévalo wrote:
> 
>> On Mon, Jul 5, 2010 at 6:15 PM, Shaun Langley  wrote:
>>> it returns /Library/PostgreSQL/8.4/lib
>>> 
>>> what's the option syntax to add the lib directory during configuration?  
>>> can I specify something like
>>> 
>>> --with-libdir='/Library/PostgreSQL/8.4/lib'
>>> 
>> 
>> The option should be --libdir='/Library/PostgreSQL/8.4/lib'. Give it a try
>> 
>> Best regards,
>> Jorge


-
William Kyngesburye 
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the 
universe is for and why it is here, it will instantly disappear and be replaced 
by something even more bizarrely inexplicable.  There is another theory which 
states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro


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


Re: [postgis-users] Build errors in MAC OSX

2010-04-26 Thread William Kyngesburye
Hmm, I'm curious.  I provide a source download purely for the GPL requirements, 
but they are exact copies of the original tarball (but oops, I haven't updated 
that in a while so you got 1.4.0, not the latest).  And they are only linked 
from my PostGIS binary download.  So, I wonder - if you have my PostGIS binary, 
is there some reason you need to build it yourself?  Debug symbols maybe?

Also, I notice that you are configuring with relative paths for GEOS and PROJ.  
Are you using the frameworks installed in /Library/Frameworks, or some other 
path.  There might be other problems later if they are not in 
/Library/Frameworks.

Finally, why are you using sudo to configure?  Do you have the source in /usr 
somewhere?  If you need to use sudo to configure, you will need to use sudo to 
make, or you will get permissions errors as you found.  Better would be to 
compile in a folder you own (~/Documents) or at least have write permissions to 
(/Users/Shared).

On Apr 26, 2010, at 2:55 PM, John Connors wrote:

> Ok. That's what I thought. I downloaded the source from KyngChaos. 
> -John
> 
> On Mon, 26 Apr 2010 12:50:45 -0700, Paul Ramsey
> 
> wrote:
>> How did you get the source, you seem to be missing files entirely...
>> 
>> P
>> 
>> On Mon, Apr 26, 2010 at 12:49 PM, John Connors 
>> wrote:

>>>>> 
>>>>> Macintosh:postgis-1.5.1 postgres$ sudo ./configure
>>>>> --with-pgconfig=../bin/pg_config
>>>>> 
>>> 
> --with-geosconfig=../../../Frameworks/GEOS.framework/Versions/3/Programs/geos-config
>>>>> --with-projdir=../../../Frameworks/PROJ.framework/unix



-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


[postgis-users] No geography_columns view on upgrade

2010-02-09 Thread William Kyngesburye
Is it intentional that running one of the upgrade SQL scripts on an old DB 
doesn't add the geometry_columns view for 1.5?

-
William Kyngesburye 
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed robot?

[Marvin]  You think you have problems?  What are you supposed to do if you ARE 
a maniacally depressed robot?  No, don't try and answer, I'm 50,000 times more 
intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] mac os install

2009-09-30 Thread William Kyngesburye
Have you tried my installers?  I have Postgres 8.3 and 8.4, and  
Postgis 1.3 and 1.4.


But it looks like a basic problem - did you first cd to the postgis  
source folder?  If so, check config.log in the postgis source folder,  
it should have more details.


On Sep 30, 2009, at 12:57 PM, alecs olpenda wrote:




hi everyone! im new here and its my first time to post. im using mac  
os leopard 10.5.8 and im trying to install postgis but sadly im  
having problem with it. i already installed postgres 8.3.7 and then  
tried versions 1.3.6 and 1.4.0 of postgis but they both display the  
same message. at first, i ran configure of which a message popped  
out saying it cant found the pg_config so i ran the command again  
with the option --with-pgsql=/path/to/pg_config flag but this time a  
new message came out which is  -bash: ./configure: no such file or  
directory. please help.


does it have something to do with the versions im using for both  
software?


alex

Feel safer online. Upgrade to the new, safer Internet Explorer 8  
optimized for Yahoo! to put your mind at peace. It's free.

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


-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


[postgis-users] Re: [geos-devel] GEOS 3.1.0

2009-03-22 Thread William Kyngesburye

Libtool reversion!

libtool in GEOS 3.0.3 is 1.5.26

libtool in GEOS 3.1.0 is 1.5.16

This creates a problem compiling a multiple-architecture library on  
OSX - libtool is stripping out the -arch and -isysroot flags.  I  
believe libtool 1.5.20 is the minimum to support these OSX flags.


This was not a problem when I built 3.1 from SVN in November, r2230.

On Mar 18, 2009, at 12:19 PM, Paul Ramsey wrote:


The GEOS team is pleased to announce that GEOS 3.1.0 has been pushed
out the door, cold, wet, trembling and looking for love.

http://download.osgeo.org/geos/geos-3.1.0.tar.bz2

Version 3.1.0 includes a number of improvements over the 3.0 version:

- PreparedGeometry operations for very fast predicate testing.
 - Intersects()
 - Covers()
 - CoveredBy()
 - ContainsProperly()
- Easier builds under MSVC and OpenSolaris
- Thread-safe CAPI option
- IsValidReason added to CAPI
- CascadedUnion operation for fast unions of geometry sets
- Single-sided buffering operation added
- Numerous bug fixes.
 http://trac.osgeo.org/geos/query?status=closed&milestone=3.1.0&order=priority

Users of the upcoming PostGIS 1.4 will find that compiling against
GEOS 3.1 provides them access to some substantial performance
improvements and some extra functions.
___
geos-devel mailing list
geos-de...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel


-
William Kyngesburye 
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no  
particular pleasure I shall kill every ___ I can until the war is  
over. That is my duty."


"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of  
the allied nations devoted an entire year exclusively to hating the  
 it wouldn't kill one ___ nor shorten the war one day."


 "And it might give 'em all stomach ulcers."

- Tarzan, on war

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


Re: [postgis-users] relationship functions not working well

2008-12-05 Thread William Kyngesburye

On Dec 5, 2008, at 5:19 PM, Obe, Regina wrote:

What does ST_Intersects + ST_Relate give you and timing.

That's the one I was interested in if that is faster than

&& + ST_Relate

In theory those 2 should give you the same answer.



Yes, I get the same features returned, but it's slower, as I expected:

large area: 15448 polys, 7924.840 ms

About as much slower, but a little better, as the difference between  
intersects time and && time - I took some more times to get an  
average, and the intersect time was a little faster than my first  
timing:


&& average: 380 ms

intersect average: 1100 ms

&& + relate average: 7200 ms

intersect + relate average: 7900 ms



-Original Message-----
From: [EMAIL PROTECTED] on behalf of  
William Kyngesburye

Sent: Fri 12/5/2008 5:34 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] relationship functions not working well


 From what I read in the docs, Intersects first checks the bbox, then
does the full intersect test.  While && just does a bbox test.

&& + st_relate gives me what I want, && only gets the touch-only
neighboring polys I don't want (and seems to be more rigorous in that
respect than intersects).

Some times - the full database has 625396 polygons (that's all the
SWBD files).

* a 1 degree selection (an island tile)

st_intersects only:  216 polys, 494.855 ms

&& only: 219 polys,  12.765 ms

&& plus st_relate:   207 polys, 189.360 ms

* a 58x13 degree rectangle (many tiles empty - alaska region)

st_intersects only:  15469 polys, 1460.344 ms

&& only: 15479 polys,  379.317 ms

&& plus st_relate:   15448 polys, 7217.592 ms


This agrees with what I said about && doing a bbox test only.  And
verifies my guess that larger areas would get real slow.



-
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] relationship functions not working well

2008-12-05 Thread William Kyngesburye
From what I read in the docs, Intersects first checks the bbox, then  
does the full intersect test.  While && just does a bbox test.


&& + st_relate gives me what I want, && only gets the touch-only  
neighboring polys I don't want (and seems to be more rigorous in that  
respect than intersects).


Some times - the full database has 625396 polygons (that's all the  
SWBD files).


* a 1 degree selection (an island tile)

st_intersects only:  216 polys, 494.855 ms

&& only: 219 polys,  12.765 ms

&& plus st_relate:   207 polys, 189.360 ms

* a 58x13 degree rectangle (many tiles empty - alaska region)

st_intersects only:  15469 polys, 1460.344 ms

&& only: 15479 polys,  379.317 ms

&& plus st_relate:   15448 polys, 7217.592 ms


This agrees with what I said about && doing a bbox test only.  And  
verifies my guess that larger areas would get real slow.



On Dec 5, 2008, at 3:34 PM, Paragon Corporation wrote:


Slight correction - I mean that it could be better to do ST_Intersects
rather than &&.  No need to do both.

-Original Message-
From: Paragon Corporation [mailto:[EMAIL PROTECTED]
Sent: Friday, December 05, 2008 4:33 PM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] relationship functions not working well


William,

Skip the intersects and use && instead (or just use ST_Intersects  
which has
&& embedded in it).  In theory you are doing an intersects check  
twice (once

in relate and once in ST_Intersects) so should be worse.

It is possible though that it could be better to do both since  
ST_Intersects

has short-cut logic that I think ST_Relate lacks and if you put the
intersects call in and it fails, it wouldn't need to do the relate.

I would be interested in the timing differences if you did them.

Hope that helps,
Regina
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
William

Kyngesburye
Sent: Friday, December 05, 2008 2:31 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] relationship functions not working well

On Dec 5, 2008, at 1:02 PM, Paul Ramsey wrote:


add

wkb_geometry && SetSRID('BOX3D(-162 55,-161 56)'::box3d,4326)

to your where clause to engage the index.

P

Do you mean just that, without the st_relate?  That gives exactly  
the same
results as st_intersects, though may be a little faster since it  
skips the

full intersection test.

Or replace the st_intersects half?  Again, probably slightly faster.

Doesn't help the st_relate half in a large box selection.


-
William Kyngesburye 
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] relationship functions not working well

2008-12-05 Thread William Kyngesburye

On Dec 5, 2008, at 1:02 PM, Paul Ramsey wrote:


add

wkb_geometry && SetSRID('BOX3D(-162 55,-161 56)'::box3d,4326)

to your where clause to engage the index.

P

Do you mean just that, without the st_relate?  That gives exactly the  
same results as st_intersects, though may be a little faster since it  
skips the full intersection test.


Or replace the st_intersects half?  Again, probably slightly faster.

Doesn't help the st_relate half in a large box selection.



Well, that works:

ST_relate(wkb_geometry, SetSRID('BOX3D(-162 55,-161 56)'::box3d, 
4326),

'T')

But it's painfully slow - looks like relate doesn't do an index  
bounding box

test.

... added a normal intersect (it's a superset of what I want) and let
short-circuit logic take care of the initial selection:

ST_Intersects(wkb_geometry, SetSRID('BOX3D(-162 55,-161 56)'::box3d, 
4326))
AND ST_relate(wkb_geometry, SetSRID('BOX3D(-162 55,-161 56)'::box3d, 
4326),

'T')

That's reasonably fast, for a small box at least.  It will likely  
slow down

on a larger box.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least

suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy


___
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


-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."


- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] relationship functions not working well

2008-12-05 Thread William Kyngesburye

On Dec 5, 2008, at 11:22 AM, Martin Davis wrote:

Good news!  I thought about this some more overnight, and I realized  
that the relation "interior-intersects" should produce the result  
you're looking for.  This still doesn't have a named predicate, but  
the really good news is that the IM pattern for this is trivial:   
[T] .


(Exercise left for the student: Prove that the pattern expression  
for "intersects-and-not-touches"  is equivalent to [T].  Or  
not - the proof in either situation would be interesting)



Well, that works:

ST_relate(wkb_geometry, SetSRID('BOX3D(-162 55,-161 56)'::box3d,4326),  
'T')


But it's painfully slow - looks like relate doesn't do an index  
bounding box test.


... added a normal intersect (it's a superset of what I want) and let  
short-circuit logic take care of the initial selection:


ST_Intersects(wkb_geometry, SetSRID('BOX3D(-162 55,-161 56)'::box3d, 
4326)) AND ST_relate(wkb_geometry, SetSRID('BOX3D(-162 55,-161  
56)'::box3d,4326), 'T')


That's reasonably fast, for a small box at least.  It will likely slow  
down on a larger box.


-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."


- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] relationship functions not working well

2008-12-04 Thread William Kyngesburye

On Dec 4, 2008, at 7:23 PM, Martin Davis wrote:

It sounds like you want the relationship "intersects-and-not- 
touches" - does that sound right?


Sounds right, given the way these functions appear to behave.

This relation has quite a complex expression in terms of the IM  
pattern languge.  It is:


[T]  or [*T***] or [***T*] or [T]
and not ( [FT***] or [F**T*] or [F***T] )

This is equivalent to:

not ([FF*FF] or [FT***] or [F**T*] or [F***T] )


Ack!  Pretty complex for what should be a simple, and basic, operation.

Maybe I'm trying to make it too complex?  Is there a simple way to  
select all features within a rectangle?  There should be, it's a  
common thing to do.



-
William Kyngesburye 
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no  
particular pleasure I shall kill every ___ I can until the war is  
over. That is my duty."


"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of  
the allied nations devoted an entire year exclusively to hating the  
 it wouldn't kill one ___ nor shorten the war one day."


 "And it might give 'em all stomach ulcers."

- Tarzan, on war

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


Re: [postgis-users] problems cleaning geometry - other options?

2008-12-04 Thread William Kyngesburye
That works.  It looks essentially the same as what's in the  
cleangeometry function from the wiki, but much simpler.  There's  
st_union and st_multi in there betwen the buildarea and boundary  
functions, probably to handle other invalid stuff.


On Dec 4, 2008, at 1:02 AM, Kevin Neufeld wrote:

Have you tried updating the geometry with a new polygonized polygon  
constructed from the linework?


UPDATE swbd
SET wkb_geometry = ST_BuildArea(ST_Boundary(wkb_geometry))
WHERE cell = 145018 AND wb = 353;

Cheers,
-- Kevin


-----
William Kyngesburye 
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled  
with hyena offal?
Second Pogril: I don't know.  Why IS life like sticking your head in a  
bucket filled with hyena offal?

First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] problems cleaning geometry - other options?

2008-12-04 Thread William Kyngesburye

On Dec 4, 2008, at 10:53 AM, Kevin Neufeld wrote:

Correct.  I assumed in your case that the rings do not need to be  
noded against eachother (that's what st_union is for), they just  
need to be sorted to determine the outer and inner rings (that's a  
task for BuildArea).

Glad it works.
-- Kevin

William Kyngesburye wrote:
That works.  It looks essentially the same as what's in the  
cleangeometry function from the wiki, but much simpler.  There's  
st_union and st_multi in there betwen the buildarea and boundary  
functions, probably to handle other invalid stuff.

On Dec 4, 2008, at 1:02 AM, Kevin Neufeld wrote:
Have you tried updating the geometry with a new polygonized  
polygon constructed from the linework?


UPDATE swbd
SET wkb_geometry = ST_BuildArea(ST_Boundary(wkb_geometry))
WHERE cell = 145018 AND wb = 353;

Cheers,
-- Kevin





I wonder if there is a way for a postgres function to see what the  
actual kind of validity error is (it just comes up as a NOTICE: in the  
sql output)?  I ran thru the whole database to see how many invalid  
polys there are (10700 of 625000) and what they are (and how long it  
will take just to test validity... 5m, not bad), and I see more than  
just this one case I first ran into (hole outside shell):


NOTICE:  Hole lies outside shell at or near point x y  [not many of  
these]

NOTICE:  Nested shells at or near point x y  [lots of these]
NOTICE:  Holes are nested at or near point x y  [lots of these]
NOTICE:  Self-intersection at or near point x y
NOTICE:  Ring Self-intersection at or near point x y
NOTICE:  Interior is disconnected at or near point x y  [a few of these]

It would be nice if the cleangeometry function could use the right  
combination of geometry operations depending on the type of geometry  
error.


-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."


- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] relationship functions not working well

2008-12-04 Thread William Kyngesburye

On Dec 4, 2008, at 2:11 PM, Nicolas Ribot wrote:

Did I miss an obvious function, or is there something that will get  
what I

want?  hmmm, maybe a combination (but would that slow it down a lot)?



Hi William,

Did you try st_relate() the the appropriate DE-9IM matrix ?
I can't give you the pattern that will express your need exactly as I
read your email rapidely, but looking here may surely help:
http://postgis.refractions.net/documentation/manual-svn/ST_Relate.html
(also following the  intersectionPatternMatrix link)

This presentation may also help:
http://www.foss4g2007.org/presentations/view.php?abstract_id=117

Nicolas



I was wondering about that function.  Unfortunately postgis 1.3  
documentation doesn't have that handy link about the  
intersectionPatternMatrix that's in the svn documentation.


I'll look at that, thanks.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."


- Marvin


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


Re: [postgis-users] relationship functions not working well

2008-12-04 Thread William Kyngesburye

On Dec 4, 2008, at 3:07 PM, Dylan Beaudette wrote:


Can you show us your queries?

Some of these examples look a little funny -- i.e. did you query  
contain the

ST_xxx() function in the JOIN condition and the gometry construction?

-- like this:
select st_intersection(a,b) from t1 join t2
on st_intersects(a,b) ;



There's only 1 table.  Is Qgis, I added a where clause to the  
connection:


where ST_Intersects(wkb_geometry, SetSRID('BOX3D(-162 55,-161  
56)'::box3d,4326))


Qgis takes care of the rest of the details, but it probably comes out  
as something like:


select * from swbd where ST_Intersects(wkb_geometry,  
SetSRID('BOX3D(-162 55,-161 56)'::box3d,4326));



-
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."


- Marvin


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


[postgis-users] relationship functions not working well

2008-12-04 Thread William Kyngesburye
When I was debugging my invalid geometry problem, I needed to select a  
small area to view.  The data is divided up into 1 degree tiles (it's  
the SRTM SWBD shapefiles imported).  I figured selecting by whole  
integer degrees would be simple to deal with.


I started with st_overlaps(), as it was mentioned in the wiki I think,  
or somewhere online (this was a few weeks ago, and don't remember the  
details).  But it was not selecting very much at all in a large area.   
I looked at the PostGIS documentation to see what other functions  
would work, but their descriptions are not plain english and and tried  
them all.  And there was a pointer to:


http://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html

that helped a little.  But none of the ones I tried gave me what I  
want - polygon areas  completely inside the box boundary and area, and  
not polygons where only the boundary touches the box boundary.


Snapshots:

http://www.kyngchaos.com/wiki/gallery:gis:temp:index

ST_Overlaps() -- only polygons selected where their boundaries touch  
the box boundary and any part of the polygon area is inside the box.   
I get none that are completely within but not touching are selected.


ST_Intersects() -- all polygons selected where //any// part of the  
polygon (boundary and inside) are in or touch //any// part of the box,  
though it seems to have missed some from the upper-right neighboring  
cells.  A lot more than I want.


ST_CoveredBy() -- only polygons where the boundary //and// area are  
completely inside only the area of the box and not touching the box  
boundary.  I don't get the polys touching the box edge.


ST_Within() -- similar to st_coveredby, except that it only seems to  
look at the outer boundary of the polygons, and that upper-right  
corner polygon is actually an invalid polygon where the "outer"  
polygon is a "hole" polygon (not visible here), thus inside and not  
touching the box boundary.



Did I miss an obvious function, or is there something that will get  
what I want?  hmmm, maybe a combination (but would that slow it down a  
lot)?


-
William Kyngesburye 
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?


[Marvin]  You think you have problems?  What are you supposed to do if  
you ARE a maniacally depressed robot?  No, don't try and answer, I'm  
50,000 times more intelligent than you and even I don't know the  
answer...


- HitchHiker's Guide to the Galaxy


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


[postgis-users] problems cleaning geometry - other options?

2008-12-03 Thread William Kyngesburye
I'm trying to fix some polygons-with-holes imported from shapefiles  
where the main polygon is not the first in the list, one of the hole  
polygons is, making them invalid.


These are 3D multipolygons - imported from the SRTM SWBD shapefiles  
(with GDAL). (file w162n55n if anyone wants to try)


The cleanGeometry funtion at:

http://postgis.refractions.net/support/wiki/index.php?CleanPolygons

isn't working, I get an error:

=>select astext(cleangeometry(wkb_geometry)) from swbd where cell =  
145018 and wb = 353;

NOTICE:  Hole lies outside shell at or near point -161.201 55.9992 0
CONTEXT:  PL/pgSQL function "cleangeometry" line 15 at IF
ERROR:  Dimensions mismatch in lwcurve
CONTEXT:  PL/pgSQL function "cleangeometry" line 19 at assignment

I tried forcing the geometry to 2D (st_force_2d()) and I get a  
different error:


NOTICE:  Hole lies outside shell at or near point -161.201 55.9992
CONTEXT:  PL/pgSQL function "cleangeometry" line 15 at IF
ERROR:  Exception in LWGEOM2GEOS: curved geometry not supported.
CONTEXT:  PL/pgSQL function "cleangeometry" line 19 at assignment

These shapefiles don't have curved geometry (I'm not sure it's  
supported in shapefiles).



I wonder if there is a simpler operation that could reorder sub- 
polygons to put the one that contains all the others first?  And would  
it be faster or slower?


-
William Kyngesburye 
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an  
illusion caused by the passage of history."


- Hitchhiker's Guide to the Galaxy


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


Re: [postgis-users]Re: Installing PostGIS on Mac OS X

2008-10-09 Thread William Kyngesburye

On Oct 9, 2008, at 9:59 AM, Maurits Diephuis wrote:

I couldn't find anything in the logs, but I did manage to get  
everything working today.


I basically replaced all $libdir occurrences with the actual path.

Not quite the right solution, but I guess it works.  When PostGIS is  
updated it will revert to $libdir again, so it would be good (for all)  
to figure out why it wasn't working.


Unfortunately, I can't think of what might be wrong.  I found a  
reference in the Postgres lists about a naming issue of a library  
module, but it doesn't apply here.


Maybe a restart of Postgres is all that's needed.

-
William Kyngesburye 
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect


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


Re: [postgis-users] Installing PostGIS on Mac OS X

2008-10-09 Thread William Kyngesburye

On Oct 8, 2008, at 9:40 AM, Maurits Diephuis wrote:


Hi,

I'm trying to install postGIS on Mac OS X (Leopard 10.5.5 on intel)
I've downloaded to following binaries:

http://www.kyngchaos.com/files/software/unixport/ 
PostgreSQL-8.3.3-1.dmg

http://www.kyngchaos.com/files/software/unixport/PostGIS-1.3.3-1a.dmg

And the GEOS 3 and PROJ 3 frameworks from the same site.

I have Postgre up and running with a database called SDM,

I then ran this command:
sudo su - postgres -c '/usr/local/pgsql/bin/createlang -U postgres  
plpgsql SDM'


Which works as far as I can see, but then PostGIS gives this error:

$ sudo su - postgres -c '/usr/local/pgsql/bin/psql -d SDM -f /usr/ 
local/pgsql/share/lwpostgis.sql'

Password:
BEGIN
psql:/usr/local/pgsql/share/lwpostgis.sql:44: NOTICE:  type  
"histogram2d" is not yet defined

DETAIL:  Creating a shell type definition.
psql:/usr/local/pgsql/share/lwpostgis.sql:44: ERROR:  could not  
access file "$libdir/liblwgeom": No such file or directory


This comes up occassionally on the list, and seems to be a problem  
with configuring the compilation (shouldn't be in this case) or  
LD_LIBRARY_PATHS at runtime (a linux problem, doesn't apply to OSX).


Maybe the logs have something helpful?  Open Console.app and see if  
there is anything in "All Messages" first.  Hopefully there will be an  
expanded error message about that $libdir - what did Postgres actually  
try.


-
William Kyngesburye 
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect


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


Re: [postgis-users] Building SVN version of PostGIS on Mac OS X Leopard

2008-08-20 Thread William Kyngesburye

On Aug 20, 2008, at 12:47 PM, Robert Rainthorpe wrote:



On Wednesday, August 20, 2008, at 06:33PM, "Robert Rainthorpe" <[EMAIL PROTECTED] 
> wrote:


William, that worked a treat. I haven't tested the build yet, but  
at least it completed!




I've started testing things now and get the following error:

/usr/local/src/postgis-svn/lwgeom postgres$ psql -f lwpostgis.sql -d  
NewGIS

BEGIN
psql:lwpostgis.sql:55: NOTICE:  type "spheroid" is not yet defined
DETAIL:  Creating a shell type definition.
psql:lwpostgis.sql:55: ERROR:  could not load library "/usr/local/ 
pgsql/lib/lwpostgis.so": dlopen(/usr/local/pgsql/lib/lwpostgis.so,  
10): no suitable image found.  Did find:

/usr/local/pgsql/lib/lwpostgis.so: mach-o, but wrong architecture



Ah!  That's because my Postgres binary is running 64bits, but a  
default compile builds 32bits.  Your new postgis is 32bits, so  
Postgres can't load it.


First, wait for Mark to update the SVN snapshot with some fixes for  
all this.


Then, do this to configure and compile postgis:

export MACOSX_DEPLOYMENT_TARGET=10.5
export PG_CPPFLAGS="-arch x86_64"
export SHLIB_LINK="-arch x86_64"
export PG_LIBS="-arch x86_64"
./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config \
--mandir=/usr/local/pgsql/man \
--with-geosconfig=/Library/Frameworks/GEOS.framework/Programs/geos- 
config \

--with-projdir=/Library/Frameworks/PROJ.framework/unix \
CFLAGS="-arch x86_64"


-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


Re: [postgis-users] Building SVN version of PostGIS on Mac OS X Leopard

2008-08-20 Thread William Kyngesburye

On Aug 20, 2008, at 10:14 AM, Mark Cave-Ayland wrote:


William Kyngesburye wrote:

Even if it's renamed (404 on that email link Mark), it will still  
try to link the installed liblwgeom.so instead of the internal  
liblwgeom.a, at compile time.  Unless you mean liblwgeom.a ->  
libpostgis.a?


Ah sorry. I misunderstood your first email :(

I'll give my -search_paths_first idea a try later and let you know  
how it goes.


Okay thanks. It would be a shame if we had to rename liblwgeom, but  
it could be the path of least resistance...




Ugh, much trouble.

I see that you're now using PGXS to let postgres handle the .c and .so  
make rules.  LDFLAGS wasn't added to this, and neither was CFLAGS.


So, my usual method for compiling a postgres extension with pgxs to  
insert some custom flags I need (for a universal build on OSX) is to  
set PG_CPPFLAGS and SHLIB_LINK.  Postgis doesn't add to these, so I  
can't do that now.  Could these be changed to += assignments?


Hardwiring -search_paths_first into SHLIB_LINK in the lwgeom makefile  
doesn't help.  pgxs puts -L/usr/local/pgsql/lib after our custom  
SHLIB_LINK flags, so it is always searched before our local ../ 
liblwgeom path.


Instead of "-L../liblwgeom -llwgeom", "./liblwgeom/liblwgeom.a"  
works.  This is fine since liblwgeom is always built as a static  
library.


-
William Kyngesburye 
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect


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


Re: [postgis-users] Building SVN version of PostGIS on Mac OS X Leopard

2008-08-20 Thread William Kyngesburye

On Aug 20, 2008, at 9:35 AM, Mark Cave-Ayland wrote:


William Kyngesburye wrote:

For the internal build linking, it looks like it's supposed to link  
to the new liblwgeom.a.  But the -L/usr/local/pgsql/lib option is  
after -L../liblwgeom AND the OSX linker prefers dynamic libs, so  
it's finding the old installed liblwgeom.so, which is what the new  
liblwpostgis.so is replacing.

Delete /usr/local/pgsql/lib/liblwgeom.* and try again.


Ahhh interesting. One of the items left for SVN trunk is to rename  
liblwgeom back to libpostgis (see http://postgis.refractions.net/pipermail/postgis-users/2008-July/020472.html) 
, and so if this really is the problem, it should resolve itself  
when the rename is complete.




Even if it's renamed (404 on that email link Mark), it will still try  
to link the installed liblwgeom.so instead of the internal  
liblwgeom.a, at compile time.  Unless you mean liblwgeom.a ->  
libpostgis.a?


I'll give my -search_paths_first idea a try later and let you know how  
it goes.


-----
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."


- Marvin


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


Re: [postgis-users] Building SVN version of PostGIS on Mac OS X Leopard

2008-08-20 Thread William Kyngesburye

On Aug 20, 2008, at 9:18 AM, William Kyngesburye wrote:

Can anyone give me a hint as to how to proceed? I'm only doing this  
build because one of my colleagues wants to use the JSON  
functionality, so if there's some other way of getting this on a  
Mac build we'd be very happy.


Thanks,

For the internal build linking, it looks like it's supposed to link  
to the new liblwgeom.a.  But the -L/usr/local/pgsql/lib option is  
after -L../liblwgeom AND the OSX linker prefers dynamic libs, so  
it's finding the old installed liblwgeom.so, which is what the new  
liblwpostgis.so is replacing.


Delete /usr/local/pgsql/lib/liblwgeom.* and try again.

Hmm, this could cause trouble for existing databases before they are  
updated.


A better way would be to change the linker search path behavior.  Try  
configuring by adding this:


LDFLAGS=-search_paths_first

-
William Kyngesburye 
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled  
with hyena offal?
Second Pogril: I don't know.  Why IS life like sticking your head in a  
bucket filled with hyena offal?

First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] Building SVN version of PostGIS on Mac OS X Leopard

2008-08-20 Thread William Kyngesburye

On Aug 20, 2008, at 2:34 AM, Robert Rainthorpe wrote:


(got a warning about DocBook stylesheets)

and then ran make and received the following error:

gcc -no-cpp-precomp -Os -D_FILE_OFFSET_BITS=64 -Wall -Wmissing- 
prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement - 
Wendif-labels -fno-strict-aliasing -fwrapv  -bundle - 
multiply_defined suppress  lwgeom_pg.o lwgeom_debug.o  
lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o  
lwgeom_inout.o lwgeom_estimate.o lwgeom_functions_basic.o  
lwgeom_gist.o lwgeom_btree.o lwgeom_transform.o stringBuffer.o  
lwgeom_box.o lwgeom_box3d.o lwgeom_box2dfloat4.o lwgeom_chip.o  
lwgeom_geos_c.o lwgeom_svg.o lwgeom_gml.o lwgeom_kml.o  
lwgeom_geojson.o lwgeom_triggers.o lwgeom_dump.o  
lwgeom_functions_lrs.o long_xact.o lwgeom_sqlmm.o lwgeom_rtree.o -L/ 
Library/Frameworks/GEOS.framework/unix/lib -L/Library/Frameworks/ 
PROJ.framework/Versions/Current/unix/lib -L../liblwgeom -L/usr/local/ 
pgsql/lib -lgeos_c -lproj -llwgeom -bundle_loader /usr/local/pgsql/ 
bin/postgres  -o liblwpostgis.0.0.so
ld: in /usr/local/pgsql/lib/liblwgeom.so, can't link with bundle  
(MH_BUNDLE) only dylibs (MH_DYLIB)

collect2: ld returned 1 exit status
make[1]: *** [liblwpostgis.0.0.so] Error 1
make: *** [postgis] Error 2

Can anyone give me a hint as to how to proceed? I'm only doing this  
build because one of my colleagues wants to use the JSON  
functionality, so if there's some other way of getting this on a Mac  
build we'd be very happy.


Thanks,

For the internal build linking, it looks like it's supposed to link to  
the new liblwgeom.a.  But the -L/usr/local/pgsql/lib option is after - 
L../liblwgeom AND the OSX linker prefers dynamic libs, so it's finding  
the old installed liblwgeom.so, which is what the new liblwpostgis.so  
is replacing.


Delete /usr/local/pgsql/lib/liblwgeom.* and try again.

-
William Kyngesburye 
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an  
illusion caused by the passage of history."


- Hitchhiker's Guide to the Galaxy


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


Re: [postgis-users] Updated shapefile to update postgres database

2008-05-06 Thread William Kyngesburye
I was interested in a similar thing once, but the ogr2ogr option names  
are misleading.


"-update" means add to an existing data source (ie the database in  
Postgres).  Otherwise ogr2ogr will try to create a new database, and  
fail if it exists.


"-append" means add to an existing layer (or, the table within the  
database) within a data source.  Otherwise it will try to create a new  
table, and fail if it exists.


Update will not replace any attributes or geometry for a feature that  
already exists with the same FID, but will stop with a duplicate key  
error.



On May 6, 2008, at 6:06 PM, Martin Chapman wrote:


Ogr2Ogr at http://www.gdal.org/ogr/ogr2ogr.html has append and update
options.  As long as your new columns were added to the end of the  
table it

will probably will work fine.

Best regards,
Martin


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
SenTnel

Sent: Tuesday, May 06, 2008 4:40 PM
To: postgis-users@postgis.refractions.net
Subject: [postgis-users] Updated shapefile to update postgres database


Hello!

I would like some help updating a postgres database. This is the  
problem: We
created the database using shp2pgsql to convert a shapefile that  
contains a
city's street details (centerline), after we created the database we  
also

created an aditional column to classify the street types (eg: street,
avenues, highways, etc.), now we are working on the original  
shapefile,

updating new roads, changes made to highways due to constructions
modifications, etc., and we want to upload the "updated" shapefile,  
without
afecting the actual database, another words, we would like to  
convert to
postgres the updated shapefile with the new information (it cuold be  
the
whole shapefile) but to keep the added clasiffication column intact.  
How can

we do that?

Thanks
--
View this message in context:
http://www.nabble.com/Updated-shapefile-to-update-postgres-database-tp170535
62p17053562.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


-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


Re: [postgis-users] Proper Installation of Postgres and Postgis on 10.5 Intel

2008-04-10 Thread William Kyngesburye
If there is a crash then check for a crashlog (Console.app).  It may  
be a problem with postgis handling bad data, or it may be as simple as  
a library linking issue.


On Apr 10, 2008, at 3:23 PM, Stefan Schwarzer wrote:


Cheers William,

thanks for your engagement!

I sent you an email a couple of days ago, which showed the same  
problems as we had before. Generally, I would say that it always  
comes down to the same thing: The postgres server craches when  
importing/restoring dumped  tables with geometries.


It just comes to my mind, that, perhaps, it's not a problem of  
postgres/postgis installation, but a problem of the tables within  
the (old) database, which i try to import?! I should try (tomorrow)  
to import a couple of "known" shapefiles, as the ones delivered with  
the ESRI stuff for example...


Thanks for your input guys, I will try, with new motivation, to get  
my beast running tomorrow morning...


Stef


Hi Stefan,

Last time we talked you were having problems with the confusion of  
the postgres system user and postgres role and the automatic  
startup of postgres.


I'd like to get it working for you, so don't give up yet.

On Apr 10, 2008, at 9:21 AM, Stefan Schwarzer wrote:

Is there any chance that this subject (for 10.5) has been solved?  
Any suggestions? I used the macports to install postgres (8.2)  
and postgis (1.3.1)...



I would, after all the experiences I went through, ask the  
question slightly different... :


Can anybody give me installation instructions on how to install  
postgres & postgis on Leopard (with a MacPro)? Either by hand- 
compiling or with MacPorts? Or some other stuff? Strange enough,  
even the kyngchaos libs didn't work, even after having completely  
re-installed my machine...


Thanks thousand times for any such advice!

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


-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."


- A rule of the universe, from the HitchHiker's Guide to the Galaxy





-
William Kyngesburye 
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?


[Marvin]  You think you have problems?  What are you supposed to do if  
you ARE a maniacally depressed robot?  No, don't try and answer, I'm  
50,000 times more intelligent than you and even I don't know the  
answer...


- HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] Proper Installation of Postgres and Postgis on 10.5 Intel

2008-04-10 Thread William Kyngesburye

Hi Stefan,

Last time we talked you were having problems with the confusion of the  
postgres system user and postgres role and the automatic startup of  
postgres.


I'd like to get it working for you, so don't give up yet.

On Apr 10, 2008, at 9:21 AM, Stefan Schwarzer wrote:

Is there any chance that this subject (for 10.5) has been solved?  
Any suggestions? I used the macports to install postgres (8.2) and  
postgis (1.3.1)...



I would, after all the experiences I went through, ask the question  
slightly different... :


Can anybody give me installation instructions on how to install  
postgres & postgis on Leopard (with a MacPro)? Either by hand- 
compiling or with MacPorts? Or some other stuff? Strange enough,  
even the kyngchaos libs didn't work, even after having completely re- 
installed my machine...


Thanks thousand times for any such advice!

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


-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."


- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] Postgis Import Problems

2008-04-10 Thread William Kyngesburye
I do have that patched in my 1.3.2 binaries, and that was the first  
thing I checked when I looked at the 1.3.3 source (yes, fixed there).


On Apr 10, 2008, at 9:35 AM, Paul Ramsey wrote:


Are you using OS/X 10.5? If so it's a known issue, try the svn version
and see if it gets any better.

On Thu, Apr 10, 2008 at 5:17 AM, Stefan Schwarzer
<[EMAIL PROTECTED]> wrote:

Hi there,

I try to use the shp2pgsql tool but whatever I do, it's just the  
help which

appears, like this:

shp2pgsql -s 4326 -I -D
/Users/schwarzer/Downloads/2008-04-10/temp/ 
aquacult_prod_marine080410140926.shp

gis.countries > Temp/countries.sql
RCSID: $Id: shp2pgsql.c 2667 2007-07-23 16:29:40Z mleslie $  
RELEASE: 1.3.1

USAGE: shp2pgsql []  [.]
OPTIONS:
...


Why would that be? Any idea? Thanks for any hints,

Stef
___
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


-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [postgis-users] SQLite and postGIS

2008-04-07 Thread William Kyngesburye
Someone started something already.  Basic for now - good for  
exchanging geodata.


http://www.gaia-gis.it/spatialite/

On Apr 7, 2008, at 5:34 PM, Stephen Woodbridge wrote:


Hi Paul,

I have started using SQLite for some projects, mostly just as a  
backing store for manipulating some data. I can't help but think it  
would be cool if it would be possible to get something like postGIS  
running in it.


I know you guys did some analysis of various databases a while back  
with an eye to their spatial potential and suitability for postGIS  
like inclusion - well at least that was my impression.


Did you look at SQLite?
Have you worked with SQLite?
Got any thoughts on this? Anyone?

I wish I could say I had a client interested in funding, but   
I don't. But I have found myself googling for info on it 4 separate  
times in the past week, which is strange because I have no immediate  
use.


The use case for something like this would be to build a standalone  
application or web service that has a SQL/Spatial back-end without  
the need for installing and administering a postgres database.


As best as I can tell, the major hurdle would be whether or not it  
is possible for a reasonable amount of effort to integrate a spatial  
index system into SQLite.


Anyway, thought I would ask? See what other people thought?

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


-----
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."


- Marvin


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


Re: [postgis-users] st_union says geometries have different srids

2008-03-17 Thread William Kyngesburye

On Mar 17, 2008, at 12:10 PM, Paul Ramsey wrote:


Nope not yet; I'm still in the process of setting up various build
environments. Does OS X support "uname -a" to show exactly what  
architecture

you are running on?


Heron:~ pramsey$ uname -a
Darwin Heron.local 9.2.0 Darwin Kernel Version 9.2.0: Tue Feb  5
16:13:22 PST 2008; root:xnu-1228.3.13~1/RELEASE_I386 i386

Nothing definitive that I can see. I'm putting together a centos
virtual box now to see if the test fails there too.

OSX 10.5 is both 32bit and 64bit, but it also depends on the processor  
- PPCs are all 64bit capable, but can run in 32bit mode (all previous  
OSX and Classic versions do this), core duos on the first Intel models  
are 32bit, core 2 duos are 64bit.  The 10.5 system includes all of  
these in one fat binary.


BUT, a default compile on 10.5 builds 32bit binaries, so unless you  
explicitly said to build 64bit, your Postgres and PostGIS are 32bit.


Or, are you using my binaries?  Those include 64bit and 32bit  
binaries, and will run 64bit when possible.



I have a Postgres 8.2 x86_64 for OSX 10.5 on my Postgres page with  
matching PostGIS 1.3.2, if you want to test it.  I've upgraded my 10.5  
Mac to PG 8.3 already and don't have a spare to install 8.2.






-
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."


- Marvin


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


Re: [postgis-users] shp2pgsql: not accepting the command?

2008-03-05 Thread William Kyngesburye
Stefan, you're using my PostGIS binary?  I thought I had renamed the  
Postgis getopt() to force it to be the one used, but looking at my  
source I see that I didn't, this time.  I must have downloaded a fresh  
copy of the source and forgot that patch.


And, do you have a 64bit Mac (Core 2 Duo) or one of the first 32bit  
Core Duo Macs?


Mark, I don't know about the original why, but in this case, the  
PostGIS getopt() works, while the OSX 10.5 32bit getopt() does not.   
The 64bit OSX getopt() does work.  There has been a system update  
since then, so I need to test it again.  (actually, very soon, since I  
was just about to rebuild for Postgres 8.3)


On Mar 5, 2008, at 4:55 AM, Mark Cave-Ayland wrote:


On Wednesday 05 March 2008 05:51:12 Stefan Schwarzer wrote:


Ah... yes indeed. 10.5.

So, what do you recommend? Wait and see? Hmm


I think the first question to ask is why do we supply our own copy  
of getopt

with shp2pgsql/pgsql in the first place? Is it because it's missing on
something like Solaris? My temptation would be to simply remove it,  
and let

everything use the system getopt...


Kind regards,

Mark.




-
William Kyngesburye 
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the  
past isn't a fiction designed to account for the discrepancy between  
my immediate physical sensations and my state of mind?"


- The Ruler of the Universe


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


Re: [postgis-users] shared memory on mac osx 10.5

2008-01-09 Thread William Kyngesburye
I was talking about this with someone a while back RE my postgres/ 
postgis binaries.  It appears that Leopard doesn't use /etc/rc any  
more (the usual way I've seen to configure sysctl, I didn't know about  
sysctl.conf).


From our discussion, sysctl.conf turned out to be the way to go on  
Leopard.



On Jan 9, 2008, at 11:26 AM, Kurt Schwehr wrote:


Hi All,

I've had this figured out on mac osx 10.4 without any trouble, but  
on 10.5 what is the/a proper way to setup shared memory for  
postgresql?


I'm goint to try creating an /etc/sysctl.conf, but figured I'd ask  
first to see if there is some other route to this.


http://wiki.finkproject.org/index.php/Shared_Memory_Regions_on_Darwin

And, I've got libgeos2 building on 10.5 with fink, so that I can get  
back to postgis development...


http://vislab-ccom.unh.edu/~schwehr/software/fink/libgeos2.info <http://vislab-ccom.unh.edu/%7Eschwehr/software/fink/libgeos2.info 
>


Thanks,
-kurt

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


-
William Kyngesburye 
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no  
particular pleasure I shall kill every ___ I can until the war is  
over. That is my duty."


"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of  
the allied nations devoted an entire year exclusively to hating the  
 it wouldn't kill one ___ nor shorten the war one day."


 "And it might give 'em all stomach ulcers."

- Tarzan, on war

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


Re: [postgis-users] shp2pgsql problem with Leopard

2007-12-30 Thread William Kyngesburye

On Dec 30, 2007, at 12:58 PM, David Garbin wrote:

Thanks for all the quick replies.  About the table name issue, I  
believe the argument "dgarbin.dtl_cnty" is the table name (schema  
qualified).  If my syntax is wrong, let me know.


You're right.  My brain registered Techer's comment and ignored your  
command line.


-
William Kyngesburye 
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] shp2pgsql problem with Leopard

2007-12-30 Thread William Kyngesburye

On Dec 30, 2007, at 12:16 PM, William Kyngesburye wrote:

If the two different declarations of getopt are causing the problem,  
I wonder if Apple's getopt will work (it's BSD getopt)?  Or did you  
customize getopt for postgis?



Well, Apple's BSD getopt works in 64bit mode, but not 32bit mode.   
This time it seems to be not getting the options correctly, and I get  
an error that:


shape (.shp) or index files (.shx) can not be opened.

So Apple's getopt is not a usable alternative.  This may be another  
case of needing to rename it (like the earlier get_uint32 problem).



-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [postgis-users] shp2pgsql problem with Leopard

2007-12-30 Thread William Kyngesburye
It works for me with David Techer's note that the table argument is  
required.  For 64bit mode.  In 32bit mode it indeed fails.


I checked the symbol names and getopt is internal.  But, in 32bit mode  
there is one case of Apple's UNIX2003 version in there also:


(__TEXT,__text) external __getopt_internal
(__TEXT,__text) external _getopt
(undefined [lazy bound]) external _getopt$UNIX2003 (from libSystem)
(__TEXT,__text) external _getopt_long

_getopt$UNIX2003 is probably used in shp2pgsql.  In 64bit mode Apple's  
getopt is not there.


It looks like Apple's symbol variant magic is the problem.  See this  
link for backgrond on symbol variants:


http://developer.apple.com/releasenotes/Darwin/SymbolVariantsRelNotes/index.html

Since 64bit OSX is pure UNIX Conforming, it has no need of symbol  
variants, so _getopt = _getopt, and postgis's getopt overrides it.   
But in 32bit mode, _getopt gets transformed to the $UNIX2003 variant  
and is used instead of postgis's, yet postgis's still gets linked into  
the binary.  And on Tiger, getopt doesn't have a variant.


If the two different declarations of getopt are causing the problem, I  
wonder if Apple's getopt will work (it's BSD getopt)?  Or did you  
customize getopt for postgis?


On Dec 30, 2007, at 11:24 AM, Mark Cave-Ayland wrote:


Hi David,

I suspect you may be experiencing this problem here:
http://postgis.refractions.net/pipermail/postgis-users/2007-December/017893.html 
. Unfortunately we need someone with some OS X knowledge to work out  
a solution that can work on all platforms, and devise a patch for  
it :(



Kind regards,

Mark.

--
ILande - Open Source Consultancy
http://www.ilande.co.uk


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


-
William Kyngesburye 
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

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


Re: [postgis-users] shp2pgsql problems on Mac OS X Leopard

2007-12-06 Thread William Kyngesburye
The problem I found which was fixed in 1.3.2, is that a function  
defined in postgis (get_uint32) was *added* to Leopard's libSystem,  
and Leopard's was linked instead of postgis's.


The getopt problem is similar, but at least in my build I see that the  
postgis version of getopt is linked into the binary.


You can check by doing this in a Terminal:

nm -mjg /usr/local/pgsql/bin/shp2pgsql | grep getopt

if the _getopt line ends with "(from libSystem)" then somehow the  
system getopt got linked in.


On Dec 6, 2007, at 12:05 PM, David Fawcett wrote:

I have used his latest Mac binaries to load a dozen shapefiles or so  
and they have loaded fine.


I had some issues with one version back, apparently due to a problem  
between Posgres and PostGIS.  Once the source was updated, he rolled  
a new one.


David.

On Dec 6, 2007 10:02 AM, John Cartwright <[EMAIL PROTECTED] 
> wrote:

It seemed to me that William Kyngesburye's (http://www.kyngchaos.com/)
version worked OK, but I don't know what his compilation options were.

-- john

Patrick Hartling wrote:
> Yes, that is what was happening for me. Without looking at the  
code, I

> had narrowed it down to some sort of argument processing problem. On
> my way in to the office this morning, I started wondering if it  
might

> not be better to use the system-provided getopt(3) for the Mac OS X
> case. I could not tell if that was the intention, but I will look  
into

> that as soon as I can. If I come up with something other than this
> #include removal hack, I will post a patch.
>
>  -Patrick
>
> On Dec 5, 2007, at 10:35 PM, John Cartwright wrote:
>
>> Hi Patrick,
>>
>> I think I ran into the same problem, but didn't realize what the
>> underlying issue was.  Just found that shp2pgsql kept complaining
>> about the inability to open valid shapefiles.
>>
>> --john
>>
>>
>> On Dec 5, 2007, at 9:32 AM, Patrick Hartling wrote:
>>
>>> I have run into a rather perplexing problem with shp2pgsql from
>>> PostGIS 1.3.1 and 1.3.2 on Mac OS X Leopard. As far as I can tell,
>>> the optarg and optind variables declared in ParseCmdline() of
>>> loader/shp2pgsql.c are being linked to the globals declared in
>>> unistd.h rather than those in loader/getopt.h. The result is that
>>> references to these variables in ParseCmdline() give the wrong
>>> values. Specifically, optarg is always NULL, and optind is 0 until
>>> the loop in lines 1363 through 1377.
>>>
>>> Looking at the output from the preprocessor, optarg, optind,  
opterr,
>>> and optopt are all  declared twice. The first is from unistd.h,  
and

>>> the second is from PostGIS' loader/getopt.h. If I remove the
>>> #include directive for unistd.h, shp2pgsql compiles, links, and  
runs
>>> correctly, although there is a compiler warning saying that  
getopt()

>>> is not declared.
>>>
>>> My guess is that there is some compiler or linker option that  
might

>>> fix this behavior, but I have not been able to determine what that
>>> might be. Removing the inclusion of unistd.h does not seem like  
the

>>> best fix, but it is a workaround that gets things running for me.
>>>
>>> -Patrick
>>>
>>>
>>> --
>>> Patrick L. Hartling
>>> Senior Software Engineer, Priority 5
>>> http://www.priority5.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
>
> --
> Patrick L. Hartling
> Senior Software Engineer, Priority 5
> http://www.priority5.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

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


-
William Kyngesburye 
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] "make check" failures w/ 1.3.1 on Mac OS 10.5

2007-11-30 Thread William Kyngesburye

I finally had a chance to try it.  Builds and all tests run.

I can't think of what might be going on on your system John.  There  
might be something helpful in your console or system logs.


On Nov 30, 2007, at 2:10 AM, Mark Cave-Ayland wrote:


On Thu, 2007-11-29 at 23:10 -0700, John Cartwright wrote:

Hi Mark,

Using the hourly svn snapshot, the build went fine, but "make check"
is still failing 12 out of 37:

../loader/shp2pgsql: shape (.shp) or index files (.shx) can not be
opened.

--john



Hi John,

Hmmm I'm not sure why the "make check" is failing because it can't  
open

the loader test files - it's good to see that the build works which is
the important thing.

The only thing I can think of is filesystem permissions - what do the
permissions for the loader/ directory look like? Are the shape files
actually present?


Kind regards,

Mark.



-
William Kyngesburye 
http://www.kyngchaos.com/

[Trillian]  What are you supposed to do WITH a maniacally depressed  
robot?


[Marvin]  You think you have problems?  What are you supposed to do if  
you ARE a maniacally depressed robot?  No, don't try and answer, I'm  
50,000 times more intelligent than you and even I don't know the  
answer...


- HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] "make check" failures w/ 1.3.1 on Mac OS 10.5

2007-11-25 Thread William Kyngesburye
Look at those /var/folders/... files.  The loader.err file has the  
last error details.  the numbered files (I forget the names after all  
my tests are succeeding) have the details for each failed test.  The  
'loader' file has the sql that was last run (tho it may not be from an  
error).


One difference is that I created the postgis_reg table and postgis- 
enabled it before running the tests, because I don't like giving  
superuser privileges to anybody, even me.  But then I had to edit the  
makefile so it uses the --nocreate option for run_test.  And edit  
run_test so it doesn't set lc_messages (a superuser setting, only  
needed for non-english languages really).


But, a postgres superuser run should work without that fuss.

On Nov 25, 2007, at 11:13 PM, John Cartwright wrote:

Thanks for looking into this William and for your suggestion.  I've  
implemented it, but am still getting 12 failures (all loader tests),  
complaining that:


../loader/shp2pgsql: shape (.shp) or index files (.shx) can not be  
opened.


I've confirmed that the shapefiles are present and should be  
accessible and that the test database (postgis_reg) is not present.


Any ideas on what might be wrong?

Thanks again for your help!

--john



On Nov 25, 2007, at 4:09 PM, William Kyngesburye wrote:

And once more... there was some leftover junk from the previous  
failed tests (a bunch of errors about relation already exists).   
After those were cleared out, all tests succeeded!


On Nov 25, 2007, at 5:02 PM, William Kyngesburye wrote:

Sorry to keep replying to myself.  I think I see the problem:  
get_uint32().  Leopard's libSystem now includes its own  
get_uint32() (and get_int32()), so this is used in postgis instead  
of the one in lwgeom_api.c.


I can't find ANY reference to this in the Leopard headers or the  
Xcode documentation, or in Apple's forums or mailing list  
archives.  So I can't tell if it's compatible, it's certainly not  
usable if there is no header declaration of it.


So, renaming get_int32() and get_uint32() in Postgis did the trick  
(I used pgis_get_int32 and pgis_get_uint32).  They're in these  
files:


liblwgeom.h
lwcurve.c
lwgeom_api.c
lwgeom_pg.c
lwline.c
lwpoint.c
lwpoly.c

I now have 5/37 fails.  Time to check on those.




-
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."


- Marvin


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


Re: [postgis-users] "make check" failures w/ 1.3.1 on Mac OS 10.5

2007-11-25 Thread William Kyngesburye
And once more... there was some leftover junk from the previous failed  
tests (a bunch of errors about relation already exists).  After those  
were cleared out, all tests succeeded!


On Nov 25, 2007, at 5:02 PM, William Kyngesburye wrote:

Sorry to keep replying to myself.  I think I see the problem:  
get_uint32().  Leopard's libSystem now includes its own get_uint32()  
(and get_int32()), so this is used in postgis instead of the one in  
lwgeom_api.c.


I can't find ANY reference to this in the Leopard headers or the  
Xcode documentation, or in Apple's forums or mailing list archives.   
So I can't tell if it's compatible, it's certainly not usable if  
there is no header declaration of it.


So, renaming get_int32() and get_uint32() in Postgis did the trick  
(I used pgis_get_int32 and pgis_get_uint32).  They're in these files:


liblwgeom.h
lwcurve.c
lwgeom_api.c
lwgeom_pg.c
lwline.c
lwpoint.c
lwpoly.c

I now have 5/37 fails.  Time to check on those.


-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."


- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] "make check" failures w/ 1.3.1 on Mac OS 10.5

2007-11-25 Thread William Kyngesburye
Sorry to keep replying to myself.  I think I see the problem:  
get_uint32().  Leopard's libSystem now includes its own get_uint32()  
(and get_int32()), so this is used in postgis instead of the one in  
lwgeom_api.c.


I can't find ANY reference to this in the Leopard headers or the Xcode  
documentation, or in Apple's forums or mailing list archives.  So I  
can't tell if it's compatible, it's certainly not usable if there is  
no header declaration of it.


So, renaming get_int32() and get_uint32() in Postgis did the trick (I  
used pgis_get_int32 and pgis_get_uint32).  They're in these files:


liblwgeom.h
lwcurve.c
lwgeom_api.c
lwgeom_pg.c
lwline.c
lwpoint.c
lwpoly.c

I now have 5/37 fails.  Time to check on those.

On Nov 25, 2007, at 3:49 PM, William Kyngesburye wrote:


Thread 0 Crashed:
0   libSystem.B.dylib   0x900e1831 get_uint32 + 32
1   liblwgeom.so  	0x0062ff6d lwcurve_deserialize +  
125

2   liblwgeom.so0x0061acfe parse_WKT_lwgeom + 142
3   postgres  	0x000d6e75 ExecMakeFunctionResult  
+ 874



-
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] "make check" failures w/ 1.3.1 on Mac OS 10.5

2007-11-25 Thread William Kyngesburye
Well, for me at least, it appears that PostGIS built on Leopard is  
crashing Postgres.  Happens in both 32bit and 64bit modes.  I'm going  
to try my old PostGIS build (built on Tiger) with my new Postgres  
build, to help narrow it down (see if it's Postgres problem).


Here's what I get in the Postgres log:

STATEMENT:  SELECT AsKML(GeomFromEWKT('POINT(1 1)'));
LOG:  server process (PID 19619) was terminated by signal 10
LOG:  terminating any other active server processes
LOG:  all server processes terminated; reinitializing
LOG:  database system was interrupted at 2007-11-25 15:29:20 CST
LOG:  checkpoint record is at 0/C99D88
LOG:  redo record is at 0/C99D88; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 0/3788; next OID: 32768
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  database system was not properly shut down; automatic recovery  
in progress

LOG:  record with zero length at 0/C99DD0
LOG:  redo is not required
LOG:  database system is ready

And in the Postgres crashlog:

Application Specific Information:
*** single-threaded process forked ***

Thread 0 Crashed:
0   libSystem.B.dylib   0x900e1831 get_uint32 + 32
1   liblwgeom.so0x0062ff6d lwcurve_deserialize + 125
2   liblwgeom.so0x0061acfe parse_WKT_lwgeom + 142
3   postgres  	0x000d6e75 ExecMakeFunctionResult +  
874

4   postgres0x000d6a75 ExecEvalFuncArgs + 91
5   postgres  	0x000d6b7b ExecMakeFunctionResult +  
112

6   postgres0x000d76e8 ExecProject + 441
7   postgres0x000e4553 ExecResult + 175
8   postgres0x000d3e1c ExecProcNode + 216
9   postgres0x000d269d ExecutorRun + 471
10  postgres0x00160117 PortalRunSelect + 153
11  postgres0x00161563 PortalRun + 625
12  postgres0x0015c6b8 exec_simple_query + 1047
13  postgres0x0015e5d1 PostgresMain + 6102
14  postgres0x00135e91 ServerLoop + 3329
15  postgres0x001375c7 PostmasterMain + 5061
16  postgres0x000f461d main + 1378
17  postgres0x26ec _start + 210
18  postgres0x2619 start + 41

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x0009  ebx: 0x0062ff01  ecx: 0x0085ba75  edx: 0x0005
  edi: 0x0004  esi: 0x0085ba75  ebp: 0xbfffde18  esp: 0xbfffde18
   ss: 0x001f  efl: 0x00010207  eip: 0x900e1831   cs: 0x0017
   ds: 0x001f   es: 0x001f   fs: 0x   gs: 0x0037
  cr2: 0x0005

Fro 64bit mode, the thread state is:

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0006  rbx: 0x00010082ba31  rcx:  
0x0020  rdx: 0x0002
  rdi: 0x00010082ba31  rsi: 0x1790  rbp:  
0x7fff5fbfdb10  rsp: 0x7fff5fbfdb10
   r8: 0x0002   r9: 0x0001  r10:  
0x000100504220  r11: 0x0001001c5627
  r12: 0x  r13: 0x00010082ba30  r14:  
0x00010082ba80  r15: 0x000382fc
  rip: 0x7fff8269ceea  rfl: 0x00010283  cr2:  
0x0002



On Nov 25, 2007, at 2:19 PM, William Kyngesburye wrote:

Possibly a permissions problem?  I just ran the tests on my new  
Leopard build, using GEOS 3, and got 36/37 fails.


Look in that /var/folders/... loader.err.  I got:

BEGIN
psql:/var/folders/sR/[snip]/-Tmp-/loader:2: NOTICE:  CREATE TABLE  
will create implicit sequence "loadedshp_gid_seq" for serial column  
"loadedshp.gid"
psql:/var/folders/sR/[snip]/-Tmp-/loader:2: NOTICE:  CREATE TABLE /  
PRIMARY KEY will create implicit index "loadedshp_pkey" for table  
"loadedshp"

CREATE TABLE
psql:/var/folders/sR/[snip]/-Tmp-/loader:3: ERROR:  permission  
denied for relation geometry_columns

CONTEXT:  SQL statement "DELETE FROM geometry_columns WHERE
		f_table_catalog = '' AND f_table_schema = 'public' AND  
f_table_name = 'loadedshp' AND f_geometry_column = 'the_geom'"

PL/pgSQL function "addgeometrycolumn" line 94 at execute statement
SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 ,  
$6 )"

PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement

Even though I made my user role the owner of the postgis_reg  
database, the lwpostgis.sql must be run as th postgres role, and it  
gets ownership of the geometry_columns table.  And one big annoyance  
I've had with postgres is that it doesn't inherit privileges like  
you'd think.


After setting up the postgis_reg DB for postgis, grant yourself all  
privileges on the geometry_columns tabl

Re: [postgis-users] "make check" failures w/ 1.3.1 on Mac OS 10.5

2007-11-25 Thread William Kyngesburye
Possibly a permissions problem?  I just ran the tests on my new  
Leopard build, using GEOS 3, and got 36/37 fails.


Look in that /var/folders/... loader.err.  I got:

BEGIN
psql:/var/folders/sR/[snip]/-Tmp-/loader:2: NOTICE:  CREATE TABLE will  
create implicit sequence "loadedshp_gid_seq" for serial column  
"loadedshp.gid"
psql:/var/folders/sR/[snip]/-Tmp-/loader:2: NOTICE:  CREATE TABLE /  
PRIMARY KEY will create implicit index "loadedshp_pkey" for table  
"loadedshp"

CREATE TABLE
psql:/var/folders/sR/[snip]/-Tmp-/loader:3: ERROR:  permission denied  
for relation geometry_columns

CONTEXT:  SQL statement "DELETE FROM geometry_columns WHERE
		f_table_catalog = '' AND f_table_schema = 'public' AND f_table_name  
= 'loadedshp' AND f_geometry_column = 'the_geom'"

PL/pgSQL function "addgeometrycolumn" line 94 at execute statement
SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 ,  
$6 )"

PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement

Even though I made my user role the owner of the postgis_reg database,  
the lwpostgis.sql must be run as th postgres role, and it gets  
ownership of the geometry_columns table.  And one big annoyance I've  
had with postgres is that it doesn't inherit privileges like you'd  
think.


After setting up the postgis_reg DB for postgis, grant yourself all  
privileges on the geometry_columns table.  After doing this, I now get  
32/37 fails - still a lot, but it's a start.



On Nov 25, 2007, at 1:22 PM, John Cartwright wrote:


Hello All,

Trying to compile v1.3.1 on leopard.  Compilation seems to go OK,  
but 35 out of 37 tests fail on the "make check" prior to  
installation.  For example:


loader/Point. failed (running shp2pgsql: /var/folders/v1/ 
v1z9PHeJEvGQIvBCSUU0QE+++TI/-Tmp-//loader.err)


loader.err contains:
../loader/shp2pgsql: shape (.shp) or index files (.shx) can not be  
opened.


The configuration summary is listed below.  Any ideas on what I'm  
doing wrong here?


Thanks!

--john


Config Summary:
HOST_OS: darwin9.1.0

  PGSQL: /usr/local/pgsql/bin/pg_config
   GEOS: /usr/local/geos-2.2.3/bin/geos-config (with C-API)
 (ldflags: -L/usr/local/geos-2.2.3/lib)
   PROJ: prefix=/usr/local/proj-4.5.0 libdir=/usr/local/proj-4.5.0/lib
  ICONV: 1 -liconv

PORTNAME: darwin
  PREFIX: /usr/local/postgis-1.3.1
 EPREFIX: ${prefix}
 DOC: ${prefix}/share/doc
DATA: ${datarootdir}
 MAN: ${datarootdir}/man
 BIN: ${exec_prefix}/bin
 EXT: ${exec_prefix}/lib (${exec_prefix}/lib)
___________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


-
William Kyngesburye 
http://www.kyngchaos.com/

"We are at war with them. Neither in hatred nor revenge and with no  
particular pleasure I shall kill every ___ I can until the war is  
over. That is my duty."


"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people of  
the allied nations devoted an entire year exclusively to hating the  
 it wouldn't kill one ___ nor shorten the war one day."


 "And it might give 'em all stomach ulcers."

- Tarzan, on war

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


Re: [postgis-users] indexing images stored in PostGres

2007-10-03 Thread William Kyngesburye
I'm curious about rasters in PostGIS also.  I heard about PGRaster at  
FOSS4G.


What about these 'religious objections'?  Or at least, can you  
describe the pros and cons? or all cons ;)


On Oct 2, 2007, at 1:45 PM, Paul Ramsey wrote:

Those of you still breathless at the opportunity to store your  
images in the database entirely (fools!) feel free to review Xing  
Lin's work in this branch. It's good work, though obviously I have  
religious objections to it... :)


http://svn.refractions.net/postgis/branches/gSoC2007_raster/


-
William Kyngesburye 
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."


- Marvin


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


Re: [postgis-users] Mac OS X development - anyone have a Mac available for testing?

2007-09-02 Thread William Kyngesburye

On Sep 2, 2007, at 6:58 PM, Webb Sprague wrote:


I built postgis, and installed proj, geos, and postgresql from fink.
With postgis, I give it a special prefix in ./configure, but that is
all. (I don't fiddle with optimizations or anything).

Fink could be the source of the trouble, though I don't know where or  
how.  I've had problems with it myself in the past, years ago when I  
was starting on the porting thing, and finally ditched it when I  
learned enough about building unix software from source.  And I've  
talked with others (in recent years) trying to (unsuccessfully) mix  
Fink/Macports and external libraries and sources, and the only  
reliable solution was to completely eradicate it from the system.


You might want to try to get Fink to add PostGIS, or ask their  
support for any ideas on what might be causing problems (if it is  
Fink causing it).



The prefix is the only other possibility I can think of.  Try  
configuring without that (use the --with-pgsql= option instead), so  
it installs in the postgres library dir.  It's simple to remove if  
that doesn't do it.



Hmm, I was just looking back at your previous emails.  I see your  
original configure line was:


./configure  --prefix=/usr/local/postgis-1.3.1
--with-proj-libdir=/usr/local/proj-4.5.0/lib/
--with-geos-libdir=/usr/local/geos-3.0.0rc4/lib/

/usr/local is not where Fink puts its stuff (it's /sw).  Are you sure  
you use Fink?  Or did you try installing and using it later?  Or  
maybe you have Fink installed, but compiled proj and geos from scratch?



-
William Kyngesburye 
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.


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


Re: [postgis-users] Mac OS X development - anyone have a Mac available for testing?

2007-09-02 Thread William Kyngesburye

Webb,

Did you see my questions a week ago about your OSX setup?

- do you build GEOS and PROJ yourself or use binaries (like my  
frameworks)?


- do you build your own Postgres or use binaries (I also have one,  
but there are a couple others out there)?


- what configure flags are you using for PostGIS?

- if you do use binaries for anything, even if it's not directly  
related to postgres or postgis, do you use Fink or Macports?  There  
are occassional little things in these that can cause trouble when  
building from source.



While it would be nice to figure out where the problem is, so others  
can avoid problems, have you tried my PostGIS binary?


On Sep 2, 2007, at 5:24 PM, Webb Sprague wrote:


Hi all,

Actually, I rebuilt from scratch and it *worked* fine but didn't pass
the regressions because when the regessions test the error messages,
that crapped out.

-W


-----
William Kyngesburye 
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled  
with hyena offal?
Second Pogril: I don't know.  Why IS life like sticking your head in  
a bucket filled with hyena offal?

First Pogril: I don't know either.  Wretched, isn't it?

-HitchHiker's Guide to the Galaxy


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


Re: [postgis-users] Mac OS X regression failures - 13/35 (was no "coveredby" in liblwgeom.1.3.so")

2007-08-24 Thread William Kyngesburye

Webb,

I finally got off my butt and worked thru those tests on my Mac.  All  
OK on my end.  I'm using the release 1.3.1 source, but I didn't see  
any major changes in the latest SVN that might have such effects.


So, I'm wondering how you built your PostGIS and Postgres. (and GEOS,  
PROJ...)


- do you build GEOS and PROJ yourself or use binaries?

They're both pretty straightforward to compile on OSX.

- do you build your own Postgres or use binaries?

Also pretty easy to compile on OSX.

- what configure flags are you using for PostGIS?

Also simple.  But I do one patch (in two places).  PostGIS is  
hardwired to include debug symbols.  For my binary release, I remove  
the -g flag from lwgeom/makefile:CSTAR_FLAGS and loader/makefile/CFLAGS.



- kindof goes along with the questions about using prebuilt binaries  
above - do you use Fink or Macports?  Even if you don't use either  
for PostGIS or any of its dependencies.  Their versions of some of  
the basic tools used in compiling may get used instead and interfere  
with a smooth and successful build (even tho it may seem to have  
sompleted successfully).


I can't remember exactly what it was, but someone once had trouble  
with a basic tool like sed or ls.  Something about a GNU version in  
Fink vs. a BSD version in OSX.  messed up the expected build process.


Fink/Macports add to your PATH, and may also fiddle with  
DYLD_LIBRARY_PATH.


They are good tools for Mac users who want to *use* common unix  
software, but can create trouble when casually compiling other  
software (whether or not you intend to use stuff from Fink/Macports  
in said compilation), and sometimes even when *using* other unix  
software.



On Aug 22, 2007, at 12:35 PM, Webb Sprague wrote:


Here is my log file and a rerun of the regression.  Cheers, and let me
know if there is anything else.

Here is your request (seems to me that these should fail, but the
regression test isn't checking for that correctly - maybe a mac thing
or a funny version of sed or something?).  I don't see any server
crashes at all:



-
William Kyngesburye 
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."


- A rule of the universe, from the HitchHiker's Guide to the Galaxy


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


  1   2   >