NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Stuart,
I'd like to try to 'fill' the coastline data derived from e.g. OUTLUSAM using the mcidas BaseMapAdapter. Using the Rivers.java approach, I can get the coastline drawn as lines, but not as filled polygons. I should point out that I am not entirely certain that the data in OUTLUSAM is actually all closed polygons.
The fill() method was written at the request of the Australian BOM for the purpose of filling coastlines and other geographical boundaries, and does that successfully.
I did see on the list how DelaunayCustom.Fill might be useful. However, I got an exceptionvisad.VisADException: path self intersects at visad.DelaunayCustom.fillCheck(DelaunayCustom.java:499) at visad.DelaunayCustom.fillCheck(DelaunayCustom.java:451) which may or may not have been specific to my data.
Boundaries from a file like OUTLUSAM are likely to have all sorts of self intersecting cases. One of the main problems is boundaries whose first and last points are identical. Leave off the last point and let the fill() method implicitly close the polygon.
My bigger concern is that i am using a display side coordinate system and Map Projections from ucar.unidata.geoloc, much like the IDV does. It seems to me that I cannot do the fill in lat/lon, I would need to fill in x,y, or am I being very stupid?
A display side CS should not be a problem since the fill() method is just converting one Data object to another (i.e., working on the data side before any display logic is invoked). Its easiest to use the fill() signature whose argument is a Gridded2DSet with manifold dimension = 1 and which returns an Irregular2DSet. These Sets are then both in lat/lon coordinates, and the Irregular2DSet is passed to the display logic. Good luck, Bill ============================================================================== To unsubscribe visad, visit: http://www.unidata.ucar.edu/mailing-list-delete-form.html ==============================================================================
visad
archives: