Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a land mask file in netCDF (also in ascii, if needed) which basically consists of a lat/long pair and a boolean (1 or 0) determining if that value is over land or not. The thing is, I'm not really sure how to use this in my Java applications.

If I can create a WKT polygon from the boundary of land/water, that would be a huge help, but other wise I'm looking for answers on how to use the net CDF files in JAVA (I looked at the netCDF java stuff but wasn't sue how to use it for my purposes).

I grab points from another source and must determine if they are on land or not.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

do you have to use that mask or could you load a shapefile (from say Natural Earth) and then do your look ups against those polygons? If you can then GeoTools (http://docs.geotools.org/stable/userguide/examples/) should be able to do this quite easily.

In fact with a little more work you should be able to export the landmask from netCDF into a GeoTiff and use that in GeoTools too. Gdal can import netCDF (http://www.gdal.org/formats_list.html).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.