Errors re-projecting 50m Ocean shapefile

Home Forums Natural Earth Map Data Physical Vectors Ocean Errors re-projecting 50m Ocean shapefile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3387

    Evan
    Participant

    The topic I posted 40 minutes ago doesn’t seem to have gone through….not sure what happened. Is it working now?

    #4023

    Evan
    Participant

    [Okay, looks like it’s working now. I think my original post was overwhelmed the software cause it was too long – here it is again, with the quoted text at the end shortened.]

    Hi everyone,

    Thank you to all the volunteers for a lot of great work on NE!

    The problem I’m having occurs when trying to re-project the 50m Ocean vector shapefile to Lambert Azimuthal Equal Area. Both QGIS (using the fTools plug-in) and MapWindow (using the GIS Tools plug-in) give me errors.

    Any help would be much appreciated! I’m a total newb, but I’m pretty smart. :-p Still, I looked into GRASS and GMT and just couldn’t figure out how to use them at all. But if both of the packages I tried produced similar errors, maybe it’s a problem with the files?

    Thanks. Here’s the detailed messages I got:

    fTools/QGIS gives the following error message:

    Failed forward transform of

    (-3.14159, 1.5708)

    with error: latitude or longitude exceeded limits

    And MapWindow produces an error log with the following content:

    Error occured while converting and projecting point. latitude or longitude exceeded limits

    Error occured while projecting point 13724 of part 0 of shape 0

    Error occured while converting and projecting point. latitude or longitude exceeded limits

    Error occured while projecting point 13725 of part 0 of shape 0

    Error occured while converting and projecting point. latitude or longitude exceeded limits

    Error occured while projecting point 13726 of part 0 of shape 0

    [a bunch more of the same]

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    at MapWinGIS.ShapefileClass.StopEditingShapes(Boolean ApplyChanges, Boolean StopEditTable, ICallback cBack)

    at MapWinGeoProc.SpatialReference.ProjectShapefile(String& sourceProj, String& destProj, String& inputSF, String& resultSF)

    #4024

    Nathaniel
    Keymaster

    @Evzob: Short answer: because of a software limitation on your end, you’ll need to clip the shapefile to a +/- 180/90 bounding box. There is a small offset in the natural earth data outside of the normal extents (that is what “latitude or longitude exceeded limits” means). So find or make such a file (but don’t download the one off the NE site) and clip the oceans with it. Long answer: Commercial GIS software doesn’t care about minor issues like this, the open source mapping community needs to update their programs to deal with unexpected data extents.

    #4025

    Nathaniel
    Keymaster

    @Evzob: You can confirm this hypothesis by testing if the following shp reprojects:

    http://www.nacis.org/naturalearth/temp/50m_ocean_clipped.zip

    #4026

    Evan
    Participant

    Nathaniel,

    Thanks for the clear and speedy answer!

    Unfortunately, I tried the file you provided, and still received the same errors from both software packages.

    I’m looking into creating my own bounding box from scratch, but I’m having trouble figuring out how to ensure that it perfectly fits to +/-180/90, since QGIS doesn’t seem to allow snapping or manually typing in node positions (and I can’t even figure out how to create new polygons at all in MapWindow)

    #4027

    Evan
    Participant

    Update – I managed (by sheer hours) to work out a solution for my specific purpose. Long story short, I ended up clipping out large sections of the ocean file (which I didn’t need for my North America map), then using a combination of different free GIS software to get the projection to work. Anyway, thanks for pointing me in the right direction, Nathaniel!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.