[pgrouting-users] latitude longitude of an intersection

Stephen Woodbridge woodbri at swoodbridge.com
Mon Mar 30 18:43:14 EDT 2009


Valeria,

It would be helpful if you posted the values for your two streets.

st_intersection(), I believe, always returns a geometry collection. This 
is because the intersection of two polylines could be a collections of 
points and line segments.

You probably want to look at st_dump() which lets you get at the 
individual pieces in a collection.

Since your collection is EMPTY it is likely that your two geometries did 
not intersect.

-Steve W

Valeria Muñoz wrote:
> Hi daniel
>     I have problems with st_intersection function, for any query the 
> result is "GEOMETRYCOLLECTION EMPTY"
>  
> my query:
> select AsText(st_intersection('".$geom_ini."','".$geom_ter."'))
>  
> $geom_ini: is the AsText(the_geom) from street A and $geom_ter: is the 
> AsText(the_geom) from the street B
> 
> I think I'm completely lost
>  
> RG
> 2009/2/25 Daniel Kastl <kastl at orkney.co.jp <mailto:kastl at orkney.co.jp>>
> 
>     Hi Valeria,
> 
>     This should be possible with PostGIS.
>     Probably you're looking for this function:
> 
>     ST_Intersection(geometry, geometry)
> 
>     http://postgis.refractions.net/documentation/manual-1.3/ch06.html#id2746133
> 
>     Daniel
> 
> 
>     Valeria Muñoz schrieb:
>>     HI!!
>>      
>>     i have a questions: can i get the latitude longitude of an
>>     intersection?, for example latitude longitude of street1 with street2
>>
>>     RG
>>
>>      
>>     _______________________________________________
>>     Pgrouting-users mailing list
>>     Pgrouting-users at lists.postlbs.org <mailto:Pgrouting-users at lists.postlbs.org>
>>     http://lists.postlbs.org/mailman/listinfo/pgrouting-users
>>       
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.postlbs.org
> http://lists.postlbs.org/mailman/listinfo/pgrouting-users




More information about the Pgrouting-users mailing list