basemap drawcountries consistency

Hello!
When trying to make a simple map of Europe with countries drawn, one can see that coastlines and country borders are not consistent.
Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish somewhere in the sea, to name just a few. Is this a known issue and is there a solution (coming at least)?

Simple script, little zooming will help to see better.

Best regards,
Andres

Simple script:
#!/usr/bin/env python
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2,
          projection='lcc',lat_0=60,lon_0=0.,
          resolution ='i',area_thresh=1000.)
fig=plt.Figure()
m.drawcoastlines()
m.drawcountries()
plt.show()

Andres Luhamaa wrote:

Hello!
When trying to make a simple map of Europe with countries drawn, one can see that coastlines and country borders are not consistent.
Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish somewhere in the sea, to name just a few. Is this a known issue and is there a solution (coming at least)?

Simple script, little zooming will help to see better.

Best regards,
Andres

Simple script:
#!/usr/bin/env python
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2,
          projection='lcc',lat_0=60,lon_0=0.,
          resolution ='i',area_thresh=1000.)
fig=plt.Figure()
m.drawcoastlines()
m.drawcountries()
plt.show()

Andres: We get the country boundary database from Generic Mapping Tools, so unless they fix it, we won't have a fix. If you can suggest a better database that does not have this problem, I can try to incorporate it.

I guess it is possible is also possible that this is intentional - and the border does extend into the sea.

-Jeff

Jeff Whitaker wrote:

Andres Luhamaa wrote:
  

Hello!
When trying to make a simple map of Europe with countries drawn, one can see that coastlines and country borders are not consistent.
Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish somewhere in the sea, to name just a few. Is this a known issue and is there a solution (coming at least)?

Simple script, little zooming will help to see better.

Best regards,
Andres

Simple script:
#!/usr/bin/env python
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2,
          projection='lcc',lat_0=60,lon_0=0.,
          resolution ='i',area_thresh=1000.)
fig=plt.Figure()
m.drawcoastlines()
m.drawcountries()
plt.show()

Andres: We get the country boundary database from Generic Mapping Tools, so unless they fix it, we won't have a fix. If you can suggest a better database that does not have this problem, I can try to incorporate it.

I guess it is possible is also possible that this is intentional - and the border does extend into the sea.

-Jeff
  
Thank You for the answer. It really might be intentional, because the border in sea never seems to be straight when it is drawn and actually now looking the same borders in google maps, there is a strong similarity. But I still think there might be an option to not draw the borders on the sea, mask them out somehow. Would it be complicated to add such an option or am I the only one disturbed by such an appearance?

Andres

···

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Andres Luhamaa wrote:

Jeff Whitaker wrote:
  

Andres Luhamaa wrote:
  

Hello!
When trying to make a simple map of Europe with countries drawn, one can see that coastlines and country borders are not consistent.
Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish somewhere in the sea, to name just a few. Is this a known issue and is there a solution (coming at least)?

Simple script, little zooming will help to see better.

Best regards,
Andres

Simple script:
#!/usr/bin/env python
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2,
          projection='lcc',lat_0=60,lon_0=0.,
          resolution ='i',area_thresh=1000.)
fig=plt.Figure()
m.drawcoastlines()
m.drawcountries()
plt.show()

Andres: We get the country boundary database from Generic Mapping Tools, so unless they fix it, we won't have a fix. If you can suggest a better database that does not have this problem, I can try to incorporate it.

I guess it is possible is also possible that this is intentional - and the border does extend into the sea.

-Jeff
  
Thank You for the answer. It really might be intentional, because the border in sea never seems to be straight when it is drawn and actually now looking the same borders in google maps, there is a strong similarity. But I still think there might be an option to not draw the borders on the sea, mask them out somehow. Would it be complicated to add such an option or am I the only one disturbed by such an appearance?

Andres
  
Andres: It might be possible, but it certainly wouldn't be trivial. You would have to compute the intersection of the country boundaries with the coastline polygons and then clip.

-Jeff

···

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg

Jeff Whitaker wrote:

Andres Luhamaa wrote:

Jeff Whitaker wrote:
  

Andres Luhamaa wrote:
  

Hello!
When trying to make a simple map of Europe with countries drawn, one can see that coastlines and country borders are not consistent.
Borders between Finland-Russia, Sweden-Norway, Germany-Denmark finish somewhere in the sea, to name just a few. Is this a known issue and is there a solution (coming at least)?

Simple script, little zooming will help to see better.

Best regards,
Andres

Simple script:
#!/usr/bin/env python
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
m=Basemap(llcrnrlon=-18.7,llcrnrlat=44.0,urcrnrlon=59.,urcrnrlat=63.2,
          projection='lcc',lat_0=60,lon_0=0.,
          resolution ='i',area_thresh=1000.)
fig=plt.Figure()
m.drawcoastlines()
m.drawcountries()
plt.show()

Andres: We get the country boundary database from Generic Mapping Tools, so unless they fix it, we won't have a fix. If you can suggest a better database that does not have this problem, I can try to incorporate it.

I guess it is possible is also possible that this is intentional - and the border does extend into the sea.

-Jeff
  

Thank You for the answer. It really might be intentional, because the border in sea never seems to be straight when it is drawn and actually now looking the same borders in google maps, there is a strong similarity. But I still think there might be an option to not draw the borders on the sea, mask them out somehow. Would it be complicated to add such an option or am I the only one disturbed by such an appearance?

Andres
  
Andres: It might be possible, but it certainly wouldn't be trivial. You would have to compute the intersection of the country boundaries with the coastline polygons and then clip.

Jeff, Andres,

As a workaround, maybe one could use a suitable combination of opaque ocean patches, and setting the zorders of the ocean patches and the country boundaries so that the latter are lower then the former.

Eric

···

-Jeff

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users