[postgis-users] Finding extra points
Mike Toews
mwtoews at gmail.com
Thu Oct 25 12:29:26 PDT 2012
Sure, use linear referencing functions[1] to interpolate along a line
between the two input points. For example, to find 10 points
in-between 'POINT(2 8)' and 'POINT(3 5)':
select ST_AsText(ST_Line_Interpolate_Point(ST_MakeLine(ST_MakePoint(2,
8), ST_MakePoint(3, 5)), f::float/10))
from generate_series(0,10) as f;
Also, if you have a Z or M coordinate to also interpolate, you can add
it as the third and fourth argument of ST_MakeLine, and you will see
the interpolated result. These extra coordinate dimensions, for
example, could be an attribute quantity from your source point data.
Keep in mind, these are linear interpolation techniques.
-Mike
[1] http://postgis.refractions.net/documentation/manual-2.0/reference.html#Linear_Referencing
On 26 October 2012 00:15, Jeff Lake <jeff at michiganwxsystem.com> wrote:
> Greetings..
> Is there a function or combination of functions in postGIS-2 that will help
> calculate
> points in between 2 given.
>
> I have imported a point shape file containing the National Hurricane
> Center's Watch/Warning breakpoints
> when they issue the warnings it contains at least 2 locations from this
> shape file.
>
> is there a way to calculate what points from the shape file would be in
> between the 2 given??
>
> --
> Jeff Lake
> MichiganWxSystem
> AllisonHouse
> GRLevelXStuff
>
> _______________________________________________
> 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