[postgis-users] Help urgently needed - geomfromEWKT() / PostGIS onMac OS X

Christian Heine christian at geosci.usyd.edu.au
Thu Feb 9 05:52:23 PST 2006


Mark & list,
On Thu, 9 Feb 2006, Mark Cave-Ayland wrote:
[snip]
>> Furthermore, I am getting the "could not create shared memory
>> segment" Error message, which I didn't get at all when I compiled
>> postgresql earlier on. What is worrying me, is that the it is
>> actually the very same setup, but things don't work anymore.
>> I would be very very grateful for any pointers/fixes or fixes or any
>> how-to's.
> Hi Christian,
>
> First of all, we'd need a lot more information about how you are installing
> PostgreSQL/PostGIS in order to be able to help. In particular, we'd need
> more information about the commands you used after ./configure (did you use
> make or make install?)
Used following sequnence of commands:
./configure
make
sudo make install
[postgresql: make check]

> how you executed initdb
[as postgresql user] initidb -D /Volumes/Data/geodatabase

>and the commands you used to
> start and stop the PostgreSQL server (so we can see that you are trying to
> connect to the version you have just compiled).
[as postgresql user] pg_ctl -D /Volumes/Data/geodatabase -l logfile start
[as postgresql user] pg_ctl stop

>Plus the *exact* command you
> are using to try and insert your EWKT geometry rather a cut down version
> would be a lot more useful.
(Taken from E. Cordery's message, 04.Feb 2005, this list)

BEGIN TRANSACTION;
create table polygon3d (id int4);
select addgeometrycolumn('polygon3d','shape',-1,'POLYGON',3);

insert into polygon3d (id,shape) values (1, 
geomfromEWKT('POLYGON((29.212389
-81.033350 10, 29.211220 -81.033817 10, 29.210930 -81.033338 10, 29.211520
-81.030326 10, 29.212582 -81.030461 10, 29.212389 -81.033350 10))',-1));

insert into polygon3d (id,shape) values (2, 
geomfromEWKT('POLYGON((29.214342
-81.036386 30, 29.210082 -81.034641 30, 29.213140 -81.036927 30, 29.214342
-81.036386 30))',-1));

insert into polygon3d (id,shape) values (3, 
geomfromEWKT('POLYGON((29.214427
-81.033325 20,29.209782 -81.031445 20, 29.209739 -81.031199 20,29.210286
-81.029269 20,29.210383 -81.029404 20 , 29.214427 -81.033325 20))',-1));
commit;

Other try, inserting into an existing db table:

BEGIN TRANSACTION;
INSERT INTO srtmtiles (tile_name, comment, tile_outline)
 	VALUES('W180N90', 'christian, 04-10-2005', 
GeomFromEWKT('POLYGON((-180 90, -140 90, -140 40, -180 40, -180 90))', 
4326));

[sequence of comparable insert statements with different polygons]

COMMIT;

As I wrote, most of the sql scripts have been working absolutley 
flawlessly until I updated (and likely stuffed up) my database. I had 
written small how-to when I did the first install, so I followed it step 
by step for this one.

> I'd be inclined to go for option 1) in your attempt to get everything
> working, as newer software tends to have less bugs, and I seem to remember
> several Xcode related fixes have been added recently.

I absolutely agree - and this was of course my intention to upgrade. I 
expected it to be a lot more smooth, but given the messages in the www 
there seem to be a fair bit of people having trouble to install Postgresql 
from src on Mac OS X 10.4.x.

> Without having more information as to all the commands you have typed, I'd
> say it sounds as if you've either mixed up different versions of
> PostgreSQL/PostGIS or your database cluster is somehow corrupted.

Well, as I wrote, I did a clean install - nothing more on the machine than 
the geos & proj libs, postgresql and postgis and a (working) version of 
readline through fink. The DB cluster should be fine (as the postgresql 
checks revealed) as it was just initialised.

Cheers,
Christian



More information about the postgis-users mailing list