[postgis-users] st_linetocurve error

2010-12-17 Thread ma...@geosar.ch

Hi,
why this gets error  on postgis 1.5.1: select 
ST_LineToCurve(geomfromtext('MULTILINESTRING((724117.946992354 
119346.456207008,724117.948 119346.478))'));


Thanks


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


Re: [postgis-users] getting the longest connected path of a multistring

2010-12-17 Thread arno
Le vendredi 17 décembre 2010, à 10:32:01 +0100, Thomas a écrit : 
> Hello,
> 
> Maybe this post from Paul Ramsey can help you a bit e.g
> http://blog.cleverelephant.ca/2010/07/network-walking-in-postgis.html
> 
> Regards

thanks for your pointers. The post does not match exactly my needs. And I 
did not succeeded in modifying it. Also, I don't want to go the c++ way for 
now. Fortunately, that computation is not a vital of my project, so I'll 
probably let it down, at least for  the moment.

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


Re: [postgis-users] import shape or sql to postgres automatically

2010-12-17 Thread zhang zhe

Hello,
 
Thanks for the link. I tried psql with my computer and it gives the error 
FATAL: Ident authentication failed for user "username" Error and Solution. 
 
I google it, and find the solution could be by modifying the pg_hba.conf file. 
I modified the file and saved. After I run your code again it comes another 
error:Could not connect to server: permission denied.
Is the server running locally and accepting
connections on Unix domain socket "var/run/postgresql/.s.PGSQL.5432"Somebody 
suggested this solution:
 
The permissions on the socket file var/run/postgresql/.s.PGSQL.5432
Ordinarily the postmaster will create the socket as world-writable,
but evidently not this time.  Perhaps you have set a nonstandard value
for "unix_socket_permissions"?  Another possibility is that it's not
the socket file itself, but /var that is mis-permissioned.

I didn´t know how to solve this problem. Do I have to install web server such 
as apache in my machine? I have used chmod 777 to change the right of 
var/run/postgresql/.s.PGSQL.5432, but it still doesn´t work.
Can you help me? 
 
Thanks
 


 
> Date: Mon, 13 Dec 2010 12:13:44 +
> From: mark.cave-ayl...@siriusit.co.uk
> To: postgis-users@postgis.refractions.net
> Subject: Re: [postgis-users] import shape or sql to postgres automatically
> 
> zhang zhe wrote:
> 
> > Hello,
> > 
> > Does anyone know how to import sql table or shape file to postgres 
> > database automatically?
> > What I did before is:
> > I have shpe file save in C:/users
> > I go to terminal in linux, and go to the directory C:/users
> > C:/users shp2pgsql shapefile.shp > sqlfile.sql
> > I will get sql file saved into c:/users directory. I open the sql file 
> > copy all the sql query. After that I open postgres database, and paste 
> > all the query to sql query window, and run the query. I will have new 
> > table appear in the dabase.
> > 
> > Sometimes the sql table is too large, that I cannot paste them all in 
> > the postgres sql query window. Postgres is always get stuck because of 
> > the query is too large.For instance I have road dataset of whole contry, 
> > and it has really millions of queries. Is there any way to import shape 
> > file or sql table to Postgres database automatically without any manual 
> > work?
> 
> Assuming you have the PostgreSQL client installed on your local Windows 
> workstation, it sounds as if you need to pass the -f option to psql and 
> then use -h to connect to your linux server instead, e.g:
> 
> psql.exe -h mylinuxserver -d mydatabase -U myuser
> -f c:/users/sqlfile.sql
> 
> HTH,
> 
> Mark.
> 
> -- 
> Mark Cave-Ayland - Senior Technical Architect
> PostgreSQL - PostGIS
> Sirius Corporation plc - control through freedom
> http://www.siriusit.co.uk
> t: +44 870 608 0063
> 
> Sirius Labs: http://www.siriusit.co.uk/labs
> ___
> 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] Validating geomatries against a coordinate system

2010-12-17 Thread Mario T. de Sales
Will have a look at it.



Thanks for the help Rob



Mario



>

>

> In our project using PostGIS we need to import some shape files into

> PostGIS. Some of these shape files have no corresponding .prj file and thus

> we ask the user to specify the coordinate system for the shape file.

>

>

>

> If the user specifies a wrong coordinate system, projecting data will not

> work correctly and PostGIS may throw errors.

>

>

>

> Is there an easy way to check whether the geometry coordinates are within a

> "valid" extent for the coordinate system?

>



EPSG has an area-of-use defined for most SRIDs to give the *general*

location of where they apply to. So you could project those "corners" into

the projection itself and use the resulting coordinates as soft limits.



However, you're still going to get plenty of errors or data appearing in the

wrong place. Might be better than nothing though :)



You can download the EPSG database from http://www.epsg.org/geodetic.html -

grab the postgresql version and get stuck in.



Rob :)



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


Re: [postgis-users] getting the longest connected path of a multistring

2010-12-17 Thread Thomas Gratier
Hello,

Maybe this post from Paul Ramsey can help you a bit e.g
http://blog.cleverelephant.ca/2010/07/network-walking-in-postgis.html

Regards

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