[postgis-users] ERROR after geos install

2010-03-14 Thread Pedro Monteiro
Hi, I'm writing to ask for help with some misbehaviour of my postgis
database, after installing geos from EPEL on a Centos 5.2 server, getting
this error.

"ERROR: could not load library "/usr/local/lib/liblwgeom.so":
libgeos_c.so.1: cannot open shared object file: No such file or directory"

I have already removed geos, and confirmed that the file exists with

Thank you in advance.

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


Re: [postgis-users] Changing transaction behaviour in shp2pgsql - summary

2010-03-14 Thread Ben Madin
Thanks all for the feedback - to summarise :

shp2pgsql - Currently, all output is 'chunked' transactions - changing this 
behaviour not currently supported. 
 - A patch could be provided to shp2pgsql to do this.
 - The suggestion is a -T switch with options such as single, chunked, no 
transactions.
 - I'm happy to look at submitting a patch... but it won't be until after I've 
submitted my thesis ...

The text editor approach is to direct output into a file and find / replace the 
BEGIN / COMMIT lines.

The on-the-fly alternative is to use a pattern matching program, with two 
solutions offered :

Using sed (thanks Brent)

shp2pgsql -s 28350 -W UTF8 \
/Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp \
gis.mrwa_gda94 | sed 's/BEGIN//' | sed 's/COMMIT//' psql australia


Using grep (thanks Steve)

shp2pgsql ... | grep -v BEGIN | grep -v COMMIT | psql australia

cheers

Ben




On 15/03/2010, at 4:35 , strk wrote:

> On Sun, Mar 14, 2010 at 04:58:02PM +0700, Ben Madin wrote:
> 
>> in the event I can't work out the encoding, is there any way to turn off the 
>> transaction behaviour, ie I'm happy to miss 4 records, but not 1000 as a 
>> result of the transactions being aborted. (short of putting it all into a 
>> text file and removing all the begin and commit commands...)
> 
> Feel like working on a patch to make "transaction policy" selectable
> with a switch ?
> 
>  -T  transaction policy (single*,none)
> 
> Current policy is chunked, dunno for what rationale..
> 
> --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

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


[postgis-users] Stephen Salathiel is out of the office on fire duties.

2010-03-14 Thread Stephen . Salathiel

I will be out of the office starting  15/03/2010 and will not return until
22/03/2010.

For all urgent enquiries, please contact Brett Miller on (03) 9637 9008.


Notice:
This email and any attachments may contain information that is personal, 
confidential, legally privileged and/or copyright.No part of it should be 
reproduced, 
adapted or communicated without the prior written consent of the copyright 
owner. 

It is the responsibility of the recipient to check for and remove viruses.
If you have received this email in error, please notify the sender by return 
email, delete 
it from your system and destroy any copies. You are not authorised to use, 
communicate or rely on the information 
contained in this email.

Please consider the environment before printing this email.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] date/time format

2010-03-14 Thread Mike Toews
It depends on your database settings. You can see what it is from
either psql or PgAdmin:

show DateStyle;

(Mine shows "ISO, DMY")

If you want to temporary change it for an SQL session, try:

set DateStyle=SQL, DMY;
select current_timestamp;

And if you like it and want to make a global change for the database:

ALTER DATABASE mydb SET DateStyle=SQL, DMY;

More info:
http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT

-Mike

On 14 March 2010 10:27, Linnet Kwamboka  wrote:
>
> hey guys,
>  when making a table column with date, the date type is chosen, what is the
>    exact date format that can be input? is it DMY or YMD and how can i change
>    this format to be DMY for ease of use?thanks
>
> --
> With regards,
> Linnet Kwamboka
>
> ___
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Changing transaction behaviour in shp2pgsql

2010-03-14 Thread strk
On Sun, Mar 14, 2010 at 04:58:02PM +0700, Ben Madin wrote:

> in the event I can't work out the encoding, is there any way to turn off the 
> transaction behaviour, ie I'm happy to miss 4 records, but not 1000 as a 
> result of the transactions being aborted. (short of putting it all into a 
> text file and removing all the begin and commit commands...)

Feel like working on a patch to make "transaction policy" selectable
with a switch ?

  -T  transaction policy (single*,none)

Current policy is chunked, dunno for what rationale..

--strk;

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


Re: [postgis-users] Changing transaction behaviour in shp2pgsql

2010-03-14 Thread pcreso
Hi Ben

You might remove the begin & commit commands via your command line with sed, or 
see if ogr2ogr gives you a more robust conversion.


For the first, something like:

shp2pgsql -s 28350 -W UTF8 \
/Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp \
gis.mrwa_gda94 | sed 's/BEGIN//' | sed 's/COMMIT//' psql australia

If this fails, or you want to try ogr2ogr, ask again :-)

Cheers,

  Brent 


--- On Sun, 3/14/10, Ben Madin  wrote:

> From: Ben Madin 
> Subject: [postgis-users] Changing transaction behaviour in shp2pgsql
> To: "PostGIS Users Discussion" 
> Date: Sunday, March 14, 2010, 10:58 PM
> G'day all,
> 
> I'm using shp2pgsql to import a road network, of which the
> fine detail is not so important. 
> 
> Mac OS X 10.6.2  POSTGIS="1.4.1"
> GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 September 2009"
> USE_STATS (thanks William K)
> 
> 
> $ shp2pgsql -s 28350
> /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp
> gis.mrwa_gda94 | psql australia
> 
> During the import a number of times (4) I get the 
> 
>     ERROR:  invalid byte sequence for
> encoding "UTF8": 0xec5343
>     HINT:  This error can also happen
> if the byte sequence does not match the encoding expected by
> the server, which is controlled by    
> "client_encoding".
>     ERROR:  current transaction is
> aborted, commands ignored until end of transaction block
> 
> and the next several hundred records are skipped.
> 
> When I put the -W UTF8 flag in , I miss the errors but die
> when I get to about 101000 (out of 15) records in :
> 
> INSERT 0 1
> INSERT 0 1
> INSERT 0 1
> INSERT 0 1
> ERROR:  syntax error at end of input
> LINE 1: ...e_geom) VALUES ('1.1557400e+005','GILMORE ST
> (SCADDAN)',
> 
> 
> in the event I can't work out the encoding, is there any
> way to turn off the transaction behaviour, ie I'm happy to
> miss 4 records, but not 1000 as a result of the transactions
> being aborted. (short of putting it all into a text file and
> removing all the begin and commit commands...)
> 
> cheers
> 
> Ben
> 
> 
> 
> 
> 
> 
> 
> ___
> 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] date/time format

2010-03-14 Thread Linnet Kwamboka
hey guys,
 when making a table column with date, the date type is chosen, what is the
   exact date format that can be input? is it DMY or YMD and how can i
change
   this format to be DMY for ease of use?thanks

-- 
With regards,
Linnet Kwamboka
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Changing transaction behaviour in shp2pgsql

2010-03-14 Thread Stephen Woodbridge

Ben,

You can probably just strip the BEGIN and COMMIT lines like

shp2pgsql ... | grep -v BEGIN | grep -v COMMIT | psql australia

You might also want to look at the file:

shp2pgsql ... > data.sql
vi data.sql

HTH,
  -Steve

Ben Madin wrote:

G'day all,

I'm using shp2pgsql to import a road network, of which the fine detail is not so important. 


Mac OS X 10.6.2  POSTGIS="1.4.1" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 
September 2009" USE_STATS (thanks William K)


$ shp2pgsql -s 28350 /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp 
gis.mrwa_gda94 | psql australia

During the import a number of times (4) I get the 


ERROR:  invalid byte sequence for encoding "UTF8": 0xec5343
HINT:  This error can also happen if the byte sequence does not match the 
encoding expected by the server, which is controlled by   "client_encoding".
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block

and the next several hundred records are skipped.

When I put the -W UTF8 flag in , I miss the errors but die when I get to about 
101000 (out of 15) records in :

INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
ERROR:  syntax error at end of input
LINE 1: ...e_geom) VALUES ('1.1557400e+005','GILMORE ST (SCADDAN)',


in the event I can't work out the encoding, is there any way to turn off the 
transaction behaviour, ie I'm happy to miss 4 records, but not 1000 as a result 
of the transactions being aborted. (short of putting it all into a text file 
and removing all the begin and commit commands...)

cheers

Ben







___
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] Changing transaction behaviour in shp2pgsql

2010-03-14 Thread Ben Madin
G'day all,

I'm using shp2pgsql to import a road network, of which the fine detail is not 
so important. 

Mac OS X 10.6.2  POSTGIS="1.4.1" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.7.1, 23 
September 2009" USE_STATS (thanks William K)


$ shp2pgsql -s 28350 /Users/owner/Spatial/country/AUS/WA/MRWA/mrwa_network.shp 
gis.mrwa_gda94 | psql australia

During the import a number of times (4) I get the 

ERROR:  invalid byte sequence for encoding "UTF8": 0xec5343
HINT:  This error can also happen if the byte sequence does not match 
the encoding expected by the server, which is controlled by   
"client_encoding".
ERROR:  current transaction is aborted, commands ignored until end of 
transaction block

and the next several hundred records are skipped.

When I put the -W UTF8 flag in , I miss the errors but die when I get to about 
101000 (out of 15) records in :

INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
ERROR:  syntax error at end of input
LINE 1: ...e_geom) VALUES ('1.1557400e+005','GILMORE ST (SCADDAN)',


in the event I can't work out the encoding, is there any way to turn off the 
transaction behaviour, ie I'm happy to miss 4 records, but not 1000 as a result 
of the transactions being aborted. (short of putting it all into a text file 
and removing all the begin and commit commands...)

cheers

Ben







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