Re: [MI-L] Create points based on distance from start of polyline

860 views
Skip to first unread message

Richard Greenwood

unread,
Jun 12, 2012, 10:47:14 PM6/12/12
to mapi...@googlegroups.com
On Mon, Jun 11, 2012 at 7:40 PM, Carl Hornibrook
<carl.ho...@gmail.com> wrote:
> Hi there,
>
> I have a series of polylines representing roads.  In a separate table I have
>> 10,000 rows representing objects such as signs, roadside furniture, lights
> etc with columns identifying which road/polyline and the chainage/road
> markers/distance in meters from the beginning of the road.
>
> Is there a way to programmatically create an object on (or offset from) a
> given polyline object based on the distance from the beginning of the
> object?
>
> Thanks in advance,
> Carl


Well it doesn't look like you've received a reply yet so my suggestion
is to use PostGIS which has various linear referencing functions. A
quick scan of the 1.5 doc's turned up the ST_Line_Interpolate_Point
function 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."

It's not a perfect fit for you but seems like it could be made to
work. You would just have to divide you distance by the total road
length. It would also be worth checking PostGIS 2.0 to see if it has
a function that allows you to just specify a distance or if there are
other linear referencing functions that would fit better.

You know that MapInfo can connect to a PostGIS db, right?

Rich

--
Richard Greenwood
richard....@gmail.com
www.greenwoodmap.com

Uffe Kousgaard

unread,
Jun 13, 2012, 2:05:41 AM6/13/12
to mapi...@googlegroups.com
Hi,

I can add that our RW Net software has the exact same kind of function
that PostGIS has (see Richard Greenwoods posting).

Unless you already have PostGIS experience, I think it is easier to use
RW Net for the task (but RW Net isn't free like PostGIS is). It just
requires a few lines of mapbasic code.

This is really one of the functions I think MapInfo ought to have
built-in. Not as part of MapCAD or anything else, but right there as a
mapbasic function.


Kind regards

Uffe Kousgaard
www.routeware.dk

Carl Hornibrook wrote:
> Hi there,
>
> I have a series of polylines representing roads. In a separate table
> I have > 10,000 rows representing objects such as signs, roadside
> furniture, lights etc with columns identifying which road/polyline and
> the chainage/road markers/distance in meters from the beginning of the
> road.
>
> Is there a way to programmatically create an object on (or offset
> from) a given polyline object based on the distance from the beginning
> of the object?
>
> Thanks in advance,
> Carl
> --
> You received this message because you are subscribed to the
> Google Groups "MapInfo-L" group.To post a message to this group, send
> email to mapi...@googlegroups.com
> To unsubscribe from this group, go to:
> http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> For more options, information and links to MapInfo resources (searching
> archives, feature requests, to visit our Wiki, visit the Welcome page at
> http://groups.google.com/group/mapinfo-l?hl=en

Gamiz Ribelles, Sergi

unread,
Jun 13, 2012, 8:53:20 AM6/13/12
to mapi...@googlegroups.com
Hi Carl,
The attached tool makes you need but once at a time for the same distance. It works by hand.
This tool creates a toogle button. It can work in two ways: marking (creates a symbol) at a given distance along a polyline, or every given distance; you chose it. If you have few different points to mark, you can rename (on the fly; while the application is on) the tab file it creates, with various symbol styles as you need (red for signals, yellow for lights,etc) and then append all those TABs. For a large number of points, as you have, this is not your tool.
This is a tool by Meridian GIS (It was an australian company; it seems disapeared, but maybe thay have moved --appears a MeridianGIS company in UTAH (??)--). If you could get/buy the source code maybe could improve it for a general purpouse.
 
 
Sergi Gàmiz Ribelles
De: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] En nombre de Carl Hornibrook
Enviado el: dimarts, 12 / juny / 2012 03:40
Para: mapi...@googlegroups.com
Asunto: [MI-L] Create points based on distance from start of polyline

DistanceMarker.zip
Reply all
Reply to author
Forward
0 new messages