SciTools / cartopy

Cartopy - a cartographic python library with matplotlib support
https://scitools.org.uk/cartopy/docs/latest
BSD 3-Clause "New" or "Revised" License
1.43k stars 365 forks source link

GSHHS lakes drawn in offset locations #604

Open timburgess opened 9 years ago

timburgess commented 9 years ago

Using the following,

import matplotlib.pyplot as plt
import cartopy.crs as crs
from cartopy.io.img_tiles import OSM, GoogleTiles
from cartopy.feature import GSHHSFeature 

if __name__ == '__main__':

    fig = plt.figure(figsize=(12,14))

    tiler = GoogleTiles()
    mercator = tiler.crs

    ax = plt.axes(projection=mercator)
    x0,y0 = 166.3, -46.5
    x1, y1 = 168.0, -44.0
    ax.set_extent([x0, x1, y0, y1])

    ax.add_image(tiler, 8)

    # coastline
    ax.add_feature(GSHHSFeature(scale='full', levels=[1,2,3]))

    fig.savefig('osm')

I get google Are GSHHS lakes really this rough or is this more likely a geometry issue?

pelson commented 9 years ago

Good question @timburgess. It doesn't look like anything is mentioned about the resolution of lower level classifications in http://www.soest.hawaii.edu/pwessel/gshhg/. The very helpful plot you provided does look like there is a considerably ~lower~ (edit: higher) resolution coastline than lakes, so my suspicion is either the lakes don't have equivalent resolution to the coastlines, or the shapefile has been incorrectly produced. Either way, I think we need a GSHHS expert to help... would you mind pinging the GSHHS authors an email to see if there is anything we're missing?

QuLogic commented 9 years ago

considerably lower resolution coastline than there is lakes

I'm thinking you maybe meant the opposite of this statement.

pelson commented 9 years ago

I'm thinking you maybe meant the opposite of this statement.

I always do that. Thanks @QuLogic