[GRASS-user] Map Collars

Hamish hamish_b at yahoo.com
Wed Apr 1 04:46:27 EDT 2009


Hi,

some time ago, Chris wrote:
> The first issue to tackle is to remove the collars of the NOAA charts.
> I've searched the archives and there are only two dated posts and both
> recommend shapefiles. Well there are no shapefiles for the Atlantic or
> other water bodies so this method cannot work.

I'm not sure how that's supposed to work, but FWIW you might try the
NOAA coastline extractor or the v.in.gshhs addon module to get the
Atlantic coastline as a vector map.

> If anyone has any suggestions or ideas it would be greatly
> appreciated on how to remove map collars of NOAA charts. 

the attached script is probably very far from the fastest way to do it,
but it works on the test map I tried (NOAA #12200). maybe the salmon
color needs to be a bit more fuzzy to cover different maps? probably some
maps have more than single pixel specks to be removed, so r.neighbors
window size could be upped.

the idea:
1) download RNC maps from NOAA's website
2) Convert BSB format to GeoTIFF with gdalwarp
3) Import GeoTiff into GRASS
4) remove any single pixel specks from the map
5) temporarily mask out white, black, salmon colored metacontent which
   occurs in the collars
6) zoom to the extent of the color-masked map
7) save a copy of the original chart using the smaller bounds to GeoTIFF
8) ... tile GeoTIFF as needed for MapServer/WMS or GpsDrive application
9) go sailing


Hamish



      


More information about the grass-user mailing list