# Re: First try at 2D filtering - reading/browsing suggestions

jim wrote:

Richard Owlett wrote:

I've started experimenting with mapping data from openstreetmap.org.
My initial goal [ *EDUCATIONAL* more than *PRACTICAL* ] is a simple
outline of states/provinces of U.S. and Canada. I wish to end up with
something an elementary teacher might hand out asking students to label
the states.

One item you may chose to retrieve is a "coastline". You it in VERY
great detail. Consider the Florida peninsula. Especially the southern
tip. A simple smooth curve would do. What I have is all the wiggles of

Since you mention 2d filtering let's assume that is going to be part of
the solution.

Your phrasing suggests that I may have unintentionally excluded some method(s) of solving my problem.

So the question would be - how do I smooth the boundary of
a closed region on a bitmap?

But I don't have a "bitmap". When I said:
One item you may chose to retrieve is a "coastline".
I meant that what I had was a "line" defined by a series of point pairs. This line does in fact define a closed region. The north and west boundary happens to be "political" rather than "physical".

Since your solution does not seem applicable - that also suggests a problem definition problem.

The term "path variable" comes to mind - but that's almost 50 years past. A different map section might make where I'm trying go clearer. assume I'm trying to draw the Louisiana coastline near New Orleans. My line result would more closely follow I10 than the the shore of Lake Pontchartrain.

You have a bitmap of the USA with everything inside the borders having
a value of 255 and all the pixels outside the border set to 0. Now you
low pass filter this image and you now have the same image with a blurry
border. Now you set all the pixels that are >127 to 255 and the rest of
the pixels set to 0. Now the border of the USA is not blurry and is
smoother than it was when you started.

-jim

What questions should I be asking?
.

• Follow-Ups: