Re: [postgis-users] PostGIS Installation Issues

2010-05-04 Thread yoda2nd
Hello,

Thanks very much for the help.  ldconfig fixed the problem right away,
even attempted a second fresh install and was able to get everything
working the first time through.

Thanks very much for the help.  


On Tue, 2010-05-04 at 13:37 -0700, Mike Toews wrote:
> For reasons beyond me, I know that after installing recent builds of
> PostGIS on Ubuntu, you are required to also run:
> 
> sudo ldconfig
> 
> I've contemplated making a trac ticket for it, but I'm not exactly
> sure what the problem is or if it can be directly addressed in the
> "make install" target (or if it was, is it now broken). See if that
> command works for you.
> 
> -Mike
> 
> On 4 May 2010 13:30, yoda2nd  wrote:
> > I tried your commands and got the same result.  Below is the error
> > message from postgis.sql.  I have checked to make sure that
> > postgis-1.5.so was there and it is.  I have been unable to find
> > libgeos_c.so with the same directory.  However both Geos and Proj
> > libraries compiled and installed without any known issues.  PostGIS
> > config picked them up correctly during ./configure.
> >
> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:59: ERROR:
> > could not load library "/usr/lib/postgresql/8.4/lib/postgis-1.5.so":
> > libgeos_c.so.1: cannot open shared object file: No such file or
> > directory
> >
> >
> > Thanks for the help Mike.
> >
> >
> > On Tue, 2010-05-04 at 12:47 -0700, Mike Toews wrote:
> >> Here is an example from a shell (dash, the default for Ubuntu):
> >>
> >> # (optional) Create a new empty database "mydb"
> >> sudo -u postgres createdb mydb
> >>
> >> # Add PL/pgSQL as a language
> >> sudo -u postgres createlang plpgsql mydb
> >>
> >> # Spatially enable it (from the 1.5 and 8.4 stocks, edit this
> >> depending on which combinaiton you have):
> >> sudo -u postgres psql -f
> >> /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql mydb
> >> sudo -u postgres psql -f
> >> /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql mydb
> >>
> >> If you want to see the error messages in more detail, then add " 2>
> >> myerrout" to the end of the last two commands above, then view the
> >> myerrorout file afterwards.
> >>
> >> -Mike
> >>
> >> On 4 May 2010 12:32, yoda2nd  wrote:
> >> > Hello all,
> >> >
> >> > I have been trying to install PostGIS on Ubuntu Server for the last few
> >> > days, however for some reason I can not get the SQL files (postgis.sql,
> >> > spatial_ref_sys.sql, etc.) into the database.  All I get is a screenfull
> >> > of the following:
> >> >
> >> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7458: ERROR:
> >> > current transaction is aborted, commands ignored until end of
> >> > transaction block
> >> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7465: ERROR:
> >> > current transaction is aborted, commands ignored until end of
> >> > transaction block
> >> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7472: ERROR:
> >> > current transaction is aborted, commands ignored until end of
> >> > transaction block
> >> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7478: ERROR:
> >> > current transaction is aborted, commands ignored until end of
> >> > transaction block
> >> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7485: ERROR:
> >> > current transaction is aborted, commands ignored until end of
> >> > transaction block
> >> >
> >> > ./configure, make, make install all run fine without any errors that I
> >> > can see.   Any help would be much appreciated!
> >> >
> >> > Thanks
> >> > yoda2nd
> >> >
> >> >
> >> >
> >> > ___
> >> > 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
> >
> ___
> 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] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-04 Thread Oscar Zamudio
Well, it works like a charm!
But I still need some advise. The query generates a polygon and I use astext
to get readable output. Now I create a new table that will contain a name
and the geometry result of the query. I want to use something like:

INSERT INTO boundaries ( the_geom, the_name ) VALUES (SELECT
ST_ConvexHull(ST_Collect(the_geom)) as the_geom from my_street_table),
'mytablename');
This can't work but I don't know how to do it better.

By now I first returned the polygon as text and then did the following:
INSERT INTO boundaries ( the_geom, the_name ) VALUES
(ST_GeomFromText('POLYGON((-58.8714168974345
-34.5696042275729,-58.9620017725354 ...))'), 'mytablename');
With this and pgsql2shp I generated a shapefile for the boundary. I could
draw the streets (original shapefile) and the boundary both together and
they match perfect!

Please excuse me if I am making a silly question but I'm a newbie.
Thanks in advance


On Mon, May 3, 2010 at 2:47 PM, Oscar Zamudio  wrote:

> I must to recognize that today I did not research further about that, I
> just remember something about convex hull from my scientific research
> background. Anyway in my case if the convex hull of the streets table
> doesn't work in the straight manner, I still can make a new table containing
>  first and last point of every line. A convex hull over them should do the
> work.
>
>
> On Mon, May 3, 2010 at 1:14 PM, Martin Davis wrote:
>
>> I believe that the convex hull of a set of lines is the same as the convex
>> hull of the vertices of the lines.  So it should do what you want.
>>
>> But if you have a reference showing otherwise I'd be interested to see it.
>>
>> Oscar Zamudio wrote:
>>
>>> ha, ha!!,
>>> My knowledge come from Maths ,and certainly not from Postgis!. The
>>> concept
>>> of Convex Hull (in algorithms and math fields) is always applied to set
>>> of
>>> points and I remember there was a big challenge to find a good method for
>>> lines (some years ago). But I don't mind Math anymore, if this function
>>> works to solve my problem, it will be ok for me.
>>> I will let you know later about my results.
>>>
>>> On Mon, May 3, 2010 at 11:29 AM, strk  wrote:
>>>
>>>
>>>
 On Mon, May 03, 2010 at 11:18:03AM -0300, Oscar Zamudio wrote:


> Thanks strk,
> As far as I know convex hull basically applies to a collection of
>
>
 points...,


> nevertheless, I will try with my set of lines.
>
>
 How far does your knowledge come from ? :)
 http://postgis.refractions.net/docs/ST_ConvexHull.html

 --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
>>>
>>>
>>
>> --
>> Martin Davis
>> Senior Technical Architect
>> Refractions Research, Inc.
>> (250) 383-3022
>>
>>
>> ___
>> 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] PostGIS Installation Issues

2010-05-04 Thread Mike Toews
For reasons beyond me, I know that after installing recent builds of
PostGIS on Ubuntu, you are required to also run:

sudo ldconfig

I've contemplated making a trac ticket for it, but I'm not exactly
sure what the problem is or if it can be directly addressed in the
"make install" target (or if it was, is it now broken). See if that
command works for you.

-Mike

On 4 May 2010 13:30, yoda2nd  wrote:
> I tried your commands and got the same result.  Below is the error
> message from postgis.sql.  I have checked to make sure that
> postgis-1.5.so was there and it is.  I have been unable to find
> libgeos_c.so with the same directory.  However both Geos and Proj
> libraries compiled and installed without any known issues.  PostGIS
> config picked them up correctly during ./configure.
>
> psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:59: ERROR:
> could not load library "/usr/lib/postgresql/8.4/lib/postgis-1.5.so":
> libgeos_c.so.1: cannot open shared object file: No such file or
> directory
>
>
> Thanks for the help Mike.
>
>
> On Tue, 2010-05-04 at 12:47 -0700, Mike Toews wrote:
>> Here is an example from a shell (dash, the default for Ubuntu):
>>
>> # (optional) Create a new empty database "mydb"
>> sudo -u postgres createdb mydb
>>
>> # Add PL/pgSQL as a language
>> sudo -u postgres createlang plpgsql mydb
>>
>> # Spatially enable it (from the 1.5 and 8.4 stocks, edit this
>> depending on which combinaiton you have):
>> sudo -u postgres psql -f
>> /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql mydb
>> sudo -u postgres psql -f
>> /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql mydb
>>
>> If you want to see the error messages in more detail, then add " 2>
>> myerrout" to the end of the last two commands above, then view the
>> myerrorout file afterwards.
>>
>> -Mike
>>
>> On 4 May 2010 12:32, yoda2nd  wrote:
>> > Hello all,
>> >
>> > I have been trying to install PostGIS on Ubuntu Server for the last few
>> > days, however for some reason I can not get the SQL files (postgis.sql,
>> > spatial_ref_sys.sql, etc.) into the database.  All I get is a screenfull
>> > of the following:
>> >
>> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7458: ERROR:
>> > current transaction is aborted, commands ignored until end of
>> > transaction block
>> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7465: ERROR:
>> > current transaction is aborted, commands ignored until end of
>> > transaction block
>> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7472: ERROR:
>> > current transaction is aborted, commands ignored until end of
>> > transaction block
>> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7478: ERROR:
>> > current transaction is aborted, commands ignored until end of
>> > transaction block
>> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7485: ERROR:
>> > current transaction is aborted, commands ignored until end of
>> > transaction block
>> >
>> > ./configure, make, make install all run fine without any errors that I
>> > can see.   Any help would be much appreciated!
>> >
>> > Thanks
>> > yoda2nd
>> >
>> >
>> >
>> > ___
>> > 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
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PostGIS Installation Issues

2010-05-04 Thread yoda2nd
I tried your commands and got the same result.  Below is the error
message from postgis.sql.  I have checked to make sure that
postgis-1.5.so was there and it is.  I have been unable to find
libgeos_c.so with the same directory.  However both Geos and Proj
libraries compiled and installed without any known issues.  PostGIS
config picked them up correctly during ./configure.

psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:59: ERROR:
could not load library "/usr/lib/postgresql/8.4/lib/postgis-1.5.so":
libgeos_c.so.1: cannot open shared object file: No such file or
directory


Thanks for the help Mike.


On Tue, 2010-05-04 at 12:47 -0700, Mike Toews wrote:
> Here is an example from a shell (dash, the default for Ubuntu):
> 
> # (optional) Create a new empty database "mydb"
> sudo -u postgres createdb mydb
> 
> # Add PL/pgSQL as a language
> sudo -u postgres createlang plpgsql mydb
> 
> # Spatially enable it (from the 1.5 and 8.4 stocks, edit this
> depending on which combinaiton you have):
> sudo -u postgres psql -f
> /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql mydb
> sudo -u postgres psql -f
> /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql mydb
> 
> If you want to see the error messages in more detail, then add " 2>
> myerrout" to the end of the last two commands above, then view the
> myerrorout file afterwards.
> 
> -Mike
> 
> On 4 May 2010 12:32, yoda2nd  wrote:
> > Hello all,
> >
> > I have been trying to install PostGIS on Ubuntu Server for the last few
> > days, however for some reason I can not get the SQL files (postgis.sql,
> > spatial_ref_sys.sql, etc.) into the database.  All I get is a screenfull
> > of the following:
> >
> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7458: ERROR:
> > current transaction is aborted, commands ignored until end of
> > transaction block
> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7465: ERROR:
> > current transaction is aborted, commands ignored until end of
> > transaction block
> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7472: ERROR:
> > current transaction is aborted, commands ignored until end of
> > transaction block
> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7478: ERROR:
> > current transaction is aborted, commands ignored until end of
> > transaction block
> > psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7485: ERROR:
> > current transaction is aborted, commands ignored until end of
> > transaction block
> >
> > ./configure, make, make install all run fine without any errors that I
> > can see.   Any help would be much appreciated!
> >
> > Thanks
> > yoda2nd
> >
> >
> >
> > ___
> > 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


Re: [postgis-users] PostGIS Installation Issues

2010-05-04 Thread Mike Toews
Here is an example from a shell (dash, the default for Ubuntu):

# (optional) Create a new empty database "mydb"
sudo -u postgres createdb mydb

# Add PL/pgSQL as a language
sudo -u postgres createlang plpgsql mydb

# Spatially enable it (from the 1.5 and 8.4 stocks, edit this
depending on which combinaiton you have):
sudo -u postgres psql -f
/usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql mydb
sudo -u postgres psql -f
/usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql mydb

If you want to see the error messages in more detail, then add " 2>
myerrout" to the end of the last two commands above, then view the
myerrorout file afterwards.

-Mike

On 4 May 2010 12:32, yoda2nd  wrote:
> Hello all,
>
> I have been trying to install PostGIS on Ubuntu Server for the last few
> days, however for some reason I can not get the SQL files (postgis.sql,
> spatial_ref_sys.sql, etc.) into the database.  All I get is a screenfull
> of the following:
>
> psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7458: ERROR:
> current transaction is aborted, commands ignored until end of
> transaction block
> psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7465: ERROR:
> current transaction is aborted, commands ignored until end of
> transaction block
> psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7472: ERROR:
> current transaction is aborted, commands ignored until end of
> transaction block
> psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7478: ERROR:
> current transaction is aborted, commands ignored until end of
> transaction block
> psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7485: ERROR:
> current transaction is aborted, commands ignored until end of
> transaction block
>
> ./configure, make, make install all run fine without any errors that I
> can see.   Any help would be much appreciated!
>
> Thanks
> yoda2nd
>
>
>
> ___
> 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] PostGIS Installation Issues

2010-05-04 Thread yoda2nd
Hello all,

I have been trying to install PostGIS on Ubuntu Server for the last few
days, however for some reason I can not get the SQL files (postgis.sql,
spatial_ref_sys.sql, etc.) into the database.  All I get is a screenfull
of the following:

psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7458: ERROR:
current transaction is aborted, commands ignored until end of
transaction block
psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7465: ERROR:
current transaction is aborted, commands ignored until end of
transaction block
psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7472: ERROR:
current transaction is aborted, commands ignored until end of
transaction block
psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7478: ERROR:
current transaction is aborted, commands ignored until end of
transaction block
psql:/gis/source_code/postgis-1.5.1/postgis/postgis.sql:7485: ERROR:
current transaction is aborted, commands ignored until end of
transaction block

./configure, make, make install all run fine without any errors that I
can see.   Any help would be much appreciated! 

Thanks
yoda2nd



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


[postgis-users] WGS84 Representation

2010-05-04 Thread konfri
Hey,

I'm trying to store WGS84 coordinates as points. A sample is:

5043.7922;N; 01324.4940;E;

So, if I store this coordinates with POINT( 5043.7922 01324.4940), the column 
contains:

0101202E90A0F831024C40C6E1CCAFE6602840

In addition, I discovered that google uses the WGS84 coordinate system too, but 
with a different representation. According to 
http://www.tma.dk/gps/#converttodec, I converted 5043.7922;N; 01324.4940;E; to:

56.01715 12.18926

I tried to visualize both representations on google maps, but just the decimal 
r. is displayed properly. There is also an other representation degree, 
minutes, seconds. I'm confused since all three representations seem to belong 
to the same WGS84 coordinate system. Am I right? So, what is the reason for 
having multiple representation of the same coordinate system. 

Would you suggest to persist the decimal representation? Or do even all 
representations end up in one internal representation as mentioned above?

Thanks for your help, unfortunately I just started with the exiting GIS topic.

Thanks.

Kon


-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ShootingStar: Rule with comma separated... bug?

2010-05-04 Thread Maria Arias de Reyna
El Tuesday 04 May 2010, Fred Lehodey escribió:
> Hi Maria.
>
> If you need multiple restrictions for a given edge then you have to add
> multiple records for that edge each with a separate restriction
>
> http://pgrouting.postlbs.org/wiki/ShootingStar
>
>
> Fred.

Thanks Fred :)

I suppose that I followed deprecated tutorials.


-- 
María Arias de Reyna Domínguez
Área de Operaciones

Emergya Consultoría 
Tfno: +34 954 51 75 77 / +34 607 43 74 27
Fax: +34 954 51 64 73 
www.emergya.es 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ShootingStar: Rule with comma separated... bug?

2010-05-04 Thread Fred Lehodey
Hi Maria.

If you need multiple restrictions for a given edge then you have to add
multiple records for that edge each with a separate restriction

http://pgrouting.postlbs.org/wiki/ShootingStar


Fred.





On Tue, May 4, 2010 at 10:14 AM, Maria Arias de Reyna wrote:

> Hi,
>
> I'm trying to do a shooting_star calculation following this example:
>
> http://www.davidgis.fr/blog/index.php?2008/07/24/349-shooting-star-usage-example-with-turn-restriction
>
> But I think that it has a bug when reading the rule. If I try to set more
> than
> one restriction on a rule, like
>
> update routing set to_cost = 100,rule='9,5' where id = 6;
>
> it only works for the first edge defined on rule (9), not the second edge
> (5).
>
> Am I doing something wrong or is it a bug?
>
> If I invert the rule:
>
> update routing set to_cost = 100,rule='5,9' where id = 6;
>
> it works well for the first edge again (5), but not for the second (9).
>
> --
> María Arias de Reyna Domínguez
> Área de Operaciones
>
> Emergya Consultoría
> Tfno: +34 954 51 75 77 / +34 607 43 74 27
> Fax: +34 954 51 64 73
> www.emergya.es
> ___
> 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] ShootingStar: Rule with comma separated... bug?

2010-05-04 Thread Maria Arias de Reyna
Hi,

I'm trying to do a shooting_star calculation following this example: 
http://www.davidgis.fr/blog/index.php?2008/07/24/349-shooting-star-usage-example-with-turn-restriction

But I think that it has a bug when reading the rule. If I try to set more than 
one restriction on a rule, like

update routing set to_cost = 100,rule='9,5' where id = 6;

it only works for the first edge defined on rule (9), not the second edge (5).

Am I doing something wrong or is it a bug?

If I invert the rule:

update routing set to_cost = 100,rule='5,9' where id = 6;

it works well for the first edge again (5), but not for the second (9).

-- 
María Arias de Reyna Domínguez
Área de Operaciones

Emergya Consultoría 
Tfno: +34 954 51 75 77 / +34 607 43 74 27
Fax: +34 954 51 64 73 
www.emergya.es 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users