Re: [postgis-users] are there any tools recommended to create a route network?

2011-11-20 Thread Ben Madin
Peng,

Did you have a look at the project strk recommended to you on the 19th July on 
this list? It would seem to answer your question?

cheers

Ben



On 21/11/2011, at 10:28 AM, sunpeng wrote:

> Hi, friends,
>   I know ArcCatlog could generate a rout network from a shp file, are there 
> any other tools recommended to create a route network?
>   Thanks!
> peng
> ___
> 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] are there any tools recommended to create a route network?

2011-11-20 Thread sunpeng
Hi, friends,
  I know ArcCatlog could generate a rout network from a shp file, are there
any other tools recommended to create a route network?
  Thanks!
peng
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] (no subject)

2011-11-20 Thread İzzet Aykut KOÇAK
.Click this link and you will find something new and interesting for
yourself!  http://aberdeen.ab.funpic.de/p.g.php?lirSection=12hi5
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] [OSGeo-Discuss] Opengeo License

2011-11-20 Thread Paul Ramsey
Ravi,

On Sat, Nov 19, 2011 at 9:33 PM, Ravi Kumar  wrote:
> Nice to see that Opengeo suite offers several Licenses of support.
> http://opengeo.org/products/suite/pricing/
> Just wish some clarity
> 1. Free downloads (and self teaching) continue ?

The community edition will always be free to download. The enterprise
edition will require registration for an evaluation. The OpenGeo
workshops (workshops.opengeo.org) are free with registration.

> 2. The License is still GNU GPL?

Yes. All components are GPL or LGPL.

> 3. A license is good for getting support, but one can do without the same,
> if competent enough..!!

We imagine our market is not individuals (who often have competence
but generally no budget) but rather organizations, whose access to
competent individuals ebbs and flows as they enter or leave the
organization, but sometimes do have budget to buy a guarantee of
access to competence (us).

Best,

P.

> OpenGeo Suite is probably a landmark development in WEB-GIS.. and going
> commercial (earning money through support) is a welcome development.
> Cheers
> Ravi
> ___
> Discuss mailing list
> disc...@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/discuss
>
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] min distance between two lines

2011-11-20 Thread Stephen Woodbridge

This might do what you want:

select st_distance_spheroid(a.the_geom, b.the_geom, 'SPHEROID["WGS 
84",6378137,298.257223563]') as minimum,
   st_distance_spheroid(st_centroid(a.the_geom), 
st_centroid(b.the_geom), 'SPHEROID["WGS 84",6378137,298.257223563]') as 
centroid

  from lines a, lines b
 where a.gid= and b.gid=

-Steve

On 11/20/2011 4:47 PM, muhammad imran wrote:

Hi Gaurav,

In principle, st_distance(geom, geom) always returns minimum distance
between two geoms and it should work for any geom type (line,
polygon, point). Function st_distance(st_centroid(geom),
st_centroid(geom)) may return the distance between centroids of
geoms. Calculating minimum distance of a geom to more than one geoms
is however tricky a bit. It has been quite a long time, I developed a
simple function (below) to find two nearest markets (among several
markets) to a village location based on minimum (Euclidian) distance.
You may have a look into it to get some idea. To find the centriod on
minimum distance between two lines, you need to return a line
geomtery, whereas st_distance_spheroid(geometry, geometry, spheroid)
returns distance as double precision. You need to use a function that
returns a shortest line between two gemoetries and then you can find
centroid on the shortest line e.g.
st_centroid(st_shortestline(geometry, geometry))

Regards, Muhammad Imran PhD Student ITC, University of Twente

CREATE OR REPLACE FUNCTION "Burkina_Faso"."BF_NN_MARKET_CAL"()
RETURNS boolean AS' DECLARE i integer; result text;

BEGIN FOR i in (select gid from "Burkina_Faso"."BF_VILLAGE_TAGED")
loop insert into "Burkina_Faso"."BF_NN_MARKET" select b.gid,
b.village,a.gid, a.market, min(st_distance(a.the_geom,
b.the_geom))/1000 from "Burkina_Faso"."BF_MARKET" a,
"Burkina_Faso"."BF_VILLAGE_TAGED" b where b.gid=i group by a.market,
b.village, a.gid, b.gid, st_distance(a.the_geom, b.the_geom) having
st_distance(a.the_geom, b.the_geom)=(select
min(st_distance(a.the_geom, b.the_geom))) order by
st_distance(a.the_geom, b.the_geom) asc limit 2; end loop; return
true; END; ' LANGUAGE plpgsql;

--- On Fri, 11/18/11, Gaurav Singh  wrote:


From: Gaurav Singh Subject: [postgis-users] min
distance between two lines To:
"postgis-users@postgis.refractions.net"



Date: Friday, November 18, 2011, 3:33 PM

Hi All,

I have two lines and I want to calculate the minimum distance
between them and finding the centroid between those two lines. Can
you help me telling of ST_Distance_Spheroid is the right method to
calculate the minimum distance between the two lines.

Thanks, Gaurav Singh
___ 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] min distance between two lines

2011-11-20 Thread muhammad imran
Hi Gaurav,

In principle, st_distance(geom, geom) always returns minimum distance between 
two geoms and it should work for any geom type (line, polygon, point). Function 
st_distance(st_centroid(geom), st_centroid(geom)) may return the distance 
between centroids of geoms. Calculating minimum distance of a geom to more than 
one geoms is however tricky a bit. It has been quite a long time, I developed a 
simple function (below) to find two nearest markets (among several markets) to 
a village location based on minimum (Euclidian) distance. You may have a look 
into it to get some idea. To find the centriod on minimum distance between two 
lines, you need to return a line geomtery, whereas 
st_distance_spheroid(geometry, geometry, spheroid) returns distance as double 
precision. You need to use a function that returns a shortest line between two 
gemoetries and then you can find centroid on the shortest line e.g. 
st_centroid(st_shortestline(geometry, geometry)) 

Regards,
Muhammad Imran
PhD Student
ITC, University of Twente

CREATE OR REPLACE FUNCTION "Burkina_Faso"."BF_NN_MARKET_CAL"() RETURNS boolean 
AS'
DECLARE
i integer;
 result text;
 
BEGIN
FOR i in (select gid from "Burkina_Faso"."BF_VILLAGE_TAGED") loop
insert into "Burkina_Faso"."BF_NN_MARKET"
select b.gid, b.village,a.gid, a.market, min(st_distance(a.the_geom, 
b.the_geom))/1000
from "Burkina_Faso"."BF_MARKET" a, "Burkina_Faso"."BF_VILLAGE_TAGED" b
where b.gid=i
group by a.market, b.village, a.gid, b.gid, st_distance(a.the_geom, b.the_geom) 
having st_distance(a.the_geom, b.the_geom)=(select min(st_distance(a.the_geom, 
b.the_geom)))
order by st_distance(a.the_geom, b.the_geom) asc 
limit 2;
end loop;
return true;
END;
' LANGUAGE plpgsql;

--- On Fri, 11/18/11, Gaurav Singh  wrote:

> From: Gaurav Singh 
> Subject: [postgis-users] min distance between two lines
> To: "postgis-users@postgis.refractions.net" 
> 
> Date: Friday, November 18, 2011, 3:33 PM
> Hi All,
> 
> I have two lines and I want to calculate the minimum
> distance between them and finding the centroid between those
> two lines.
> Can you help me telling of ST_Distance_Spheroid is the
> right method to calculate the minimum distance between the
> two lines.
> 
> Thanks,
> Gaurav Singh
> ___
> 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] Problems installing PostGIS 2.0SVN on PostgreSQL 9.1

2011-11-20 Thread Steffen Weber
I had two version of GEOS... solved it by removing the older one... running 
GEOS 3.3.1 now


-Ursprüngliche Nachricht-
Von: "Mike Toews" 
Gesendet: 20.11.2011 06:54:05
An: "PostGIS Users Discussion" 
Betreff: Re: [postgis-users] Problems installing PostGIS 2.0SVN on PostgreSQL 
9.1

>On 18 November 2011 17:11,  wrote:
>> cd postgis-2.0.0SVN
>> ./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config
>> make
>> make install
>It's a good idea to also run a [sudo] ldconfig command here
>> createdb db
>> createlang plpgsql db
>>
>> When loading postgis.sql definitions with...
>>
>> psql -d db -h localhost -p 5432 -U postgres -f 
>> /usr/local/pgsql/share/contrib/postgis-2.0/postgis.sql
>
>There should only be one error, and you can stop psql on that with by
>adding -v ON_ERROR_STOP=1 to your command
>
>> ERROR:  could not load library "/usr/local/pgsql/lib/postgis-2.0.so": 
>> /usr/local/pgsql/lib/postgis-2.0.so: undefined symbol: GEOSRelatePatternMatch
>> STATEMENT:  CREATE OR REPLACE FUNCTION spheroid_in(cstring)
>> RETURNS spheroid
>> AS '$libdir/postgis-2.0','ellipsoid_in'
>> LANGUAGE 'C' IMMUTABLE STRICT;
>
>This looks like your error. What version of GEOS do you have? For
>PostGIS 2.0 you need GEOS 3.2.2 or higher.
>
>-Mike
>___
>postgis-users mailing list
>postgis-users@postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users


___
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users