nvkelso / natural-earth-vector

A global, public domain map dataset available at three scales and featuring tightly integrated vector and raster data.
https://www.naturalearthdata.com/
Other
1.8k stars 370 forks source link

Angle out of range error #912

Open geoffyG opened 6 months ago

geoffyG commented 6 months ago

Whenever I try running certain shape files in the Shapefiles.java example, I get the error, gov.nasa.worldwind.util.Tile computeRow "SEVERE: Angle out of range 90.00020582366386°"

It always happens with ocean and bathymetry shape files. I haven't been able to find a way to fix it and I'm wondering if anyone else has run into this problem?

nvkelso commented 6 months ago

Have you tried processing them with a buffer(0)?

geoffyG commented 6 months ago

I'm not sure I understand how to do that. Would that be something I add to the run-demo.bat file?

nvkelso commented 6 months ago

Use a library like Shapely, or QGIS desktop app also includes a buffer function.

geoffyG commented 6 months ago

I'll see if I can configure the Shapely library to run with java. I couldn't get the QGIS desktop app to work

nvkelso commented 6 months ago

If you're in Java then try https://www.osgeo.org/projects/geos/ to do the buffer?

nvkelso commented 6 months ago

It could also be a clipping issue, that you need to clip these themes to a ±180, ±90 bounding box? Instead of "angle" it may be "extent"?

geoffyG commented 6 months ago

It's weird because I can get the land shapefiles to work, but ocean and bathymetry shapefiles all have this error. They are being projected onto a globe, but it doesn't make sense as to why they go past 90 degrees. Right now, I'm thinking there is something wrong with the data in the shapefiles, or there is something wrong with how they are being read in. I'll look into the osgeo link today and see what I can find