5

Is there a function like Postgis ST_Line_Interpolate_Point in GeoPandas?

franco_b
  • 522
  • 1
  • 6
  • 15

1 Answers1

6

As was mentioned by @klewis, Shapely methods can be used in GeoPandas. Shapely has the interpolate method which will

Return a point at the specified distance along a linear geometric object.

It also has the normalized argument.

If the normalized arg is True, the distance will be interpreted as a fraction of the geometric object’s length.

This is probably the most analogous function to ST_Line_Interpolate_Point which

Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 representing fraction of total length of linestring the point has to be located.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Fezter
  • 21,867
  • 11
  • 68
  • 123