RES: [postgis-users] Point (x%) on a linestring
Alex Martins Daher
aldaher at cpqd.com.br
Fri Aug 13 06:36:10 PDT 2004
Hi!
Thanks for the tips, folks!
I tried to use the line_interpolate_point function, but:
geocoder=# select line_interpolate_point(GeometryFromText('MULTILINESTRING((-51.4933730667105 -29.1662071724963,-51.4933280072013 -29.1666495955688))'),0.5);
ERROR: line_interpolate_point: 1st arg isnt a line
My geometry is a multilinestring, but if a try to pick the same points as a linestring, I get this
error:
geocoder=# select line_interpolate_point(GeometryFromText('LINESTRING((-51.4933730667105 -29.1662071724963,-51.4933280072013 -29.1666495955688))'),0.5);
ERROR: couldnt parse object in GEOMETRY
How can I solve this?
Regards,
Alex
> -----Mensagem original-----
> De: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]Em nome de Paul
> Ramsey
> Enviada em: quinta-feira, 12 de agosto de 2004 19:22
> Para: PostGIS Users Discussion
> Assunto: Re: [postgis-users] Point (x%) on a linestring
>
>
> One of the many under documented jewels...
>
> line_interpolate_point(geometry,float8)
>
> Alex Martins Daher wrote:
>
> > Hi all!
> >
> > I have a multilinestring like this one:
> > MULTILINESTRING((-51.4933730667105
> -29.1662071724963,-51.4933280072013 -29.1666495955688))
> >
> > And I want to know what is the point on the linestring that
> is x% from the start.
> > For instance, the centroid of that geometry is 50% from the start.
> >
> > Is there any function that can do that: I pass the geometry
> anda the percentage and returns
> > the point (geometry) that is x% from the start.
> >
> > I took a look at that docs but couldn't find anything.
> >
> > Regards,
> > Alex
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list