I have posted the code and MS Windows .exe for a program that thins polylines within a KML file using the Douglas Peucker line simplification routine. This should help if your KML files are too big for rendering on Google Maps because of too much detail in their polylines. Reduction works on both outer and inner boundaries, also ensures last node = first.
> I have posted the code and MS Windows .exe for a program that thins > polylines within a KML file using the Douglas Peucker line > simplification routine. This should help if your KML files are too big > for rendering on Google Maps because of too much detail in their > polylines. Reduction works on both outer and inner boundaries, also > ensures last node = first.
Just wondering if you or anyone else has tried fitting a curve (arc of a circle) to a polyline. I am trying to simplify the way polylines are represented in the U.S. Census Department's Tiger Line database. A sequence of imprecise points is not a good way to describe short segments of highways. Highways are designed by engineers without abrupt changes in direction. The true path is usually circular with smooth transitions at either end.
The math for cubic splines and/or Bezier curves is way over my head but I thought some kind of simple curve fitting might provide another way to describe a short man-made line segment. The two end points should always be on the arc of the circle. The center of the circle should be on the line equidistant from the two end points. Perhaps a least squared error approach could be used to solve for the radius of the circle. Perhaps just the average radius using each intermediate point together with the two end points could be used. Perhaps intermediate points should be weighted according to their distance from the middle.
Do you have any suggestions on algorithms ? Thanks very much for any ideas you can provide.
> Just wondering if you or anyone else has tried fitting a curve (arc of > a circle) to a polyline. I am trying to simplify the way polylines > are represented in the U.S. Census Department's Tiger Line database. > A sequence of imprecise points is not a good way to describe short > segments of highways. Highways are designed by engineers without > abrupt changes in direction. The true path is usually circular with > smooth transitions at either end.
> The math for cubic splines and/or Bezier curves is way over my head > but I thought some kind of simple curve fitting might provide another > way to describe a short man-made line segment. The two end points > should always be on the arc of the circle. The center of the circle > should be on the line equidistant from the two end points. Perhaps a > least squared error approach could be used to solve for the radius of > the circle. Perhaps just the average radius using each intermediate > point together with the two end points could be used. Perhaps > intermediate points should be weighted according to their distance > from the middle.
> Do you have any suggestions on algorithms ? Thanks very much for any > ideas you can provide.
> On Feb 13, 4:26 pm, "Bill Chadwick" <bill.chadw...@thalesgroup.com> > wrote:
> > I have posted the code and MS Windows .exe for a program that thins > > polylines within a KML file using the Douglas Peucker line > > simplification routine. This should help if your KML files are too big > > for rendering on Google Maps because of too much detail in their > > polylines. Reduction works on both outer and inner boundaries, also > > ensures last node = first.
Someday GMap may support oval and arc geometric objects, i hope. These objects are supported by VML and SVG.
I'm currently playing with my oval customoverlay in VML and SVG. If i have time i may try arc which i think is more complex when come to smoothing it with polylines.
~newton
On Feb 13, 9:39 am, "bratliff" <bratl...@umich.edu> wrote:
> Just wondering if you or anyone else has tried fitting a curve (arc of > a circle) to a polyline. I am trying to simplify the way polylines > are represented in the U.S. Census Department's Tiger Line database. > A sequence of imprecise points is not a good way to describe short > segments of highways. Highways are designed by engineers without > abrupt changes in direction. The true path is usually circular with > smooth transitions at either end.
> The math for cubic splines and/or Bezier curves is way over my head > but I thought some kind of simple curve fitting might provide another > way to describe a short man-made line segment. The two end points > should always be on the arc of the circle. The center of the circle > should be on the line equidistant from the two end points. Perhaps a > least squared error approach could be used to solve for the radius of > the circle. Perhaps just the average radius using each intermediate > point together with the two end points could be used. Perhaps > intermediate points should be weighted according to their distance > from the middle.
> Do you have any suggestions on algorithms ? Thanks very much for any > ideas you can provide.