Questions tagged [matplotlib-basemap]

A library for plotting 2D data on maps in Python

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
967 views

draw map scale in geopandas

Is there a geopandas version of basemap's m.drawmapscale function? If not, can I somehow utilize basemap's drawmapscale function within geopandas?
3
votes
0answers
319 views

Raster flipping latitude or not showing shapefile on basemap

I am trying to save a 2D numpy array as a raster, and then split the raster using shapefiles. When I create the raster, I either have the problem of the latitude being flipped upside down, or that the ...
2
votes
0answers
67 views

Plotting Geopandas Gallery example fails?

I have been having trouble getting the figures from the example provided in Geopandas Gallery examples. When I ran these scripts in Jupyter console: import geopandas import geoplot import matplotlib....
2
votes
0answers
510 views

All contours are not getting converted to shapefile in python

I am trying to create isoline plot for a weather parameter. Inputs are Lat, Lon and Value. They are read from csv file. When I plot the contours using matplotlib, the code works fine and generates ...
2
votes
0answers
682 views

Raster and shapefiles are not overlapping in matplotlib?

I plotted a raster map using matplotlib. When I overlay a shapefile, the raster seems to be shifted a bit. The same raster and shapefile overlap each other perfectly in ArcGIS. Here is what I am ...
2
votes
0answers
503 views

Grid parameter restriction of mpl_toolkits.basemap.maskoceans

I have plotted the image below with the use of matplotlib and mpl_toolkits.basemap. However I am not satisfied with the result. The image is still very blocky near the coast line. The grid parameter ...
1
vote
0answers
141 views

Shapely “parallel_offset” with distance in meters from Lat/Lon coordinates

I need to find a LineString at a distance in meters from a line with coordinates in Lat/Lon. I am trying this approach based on what i found in this question https://stackoverflow.com/questions/...
1
vote
0answers
1k views

Plotting Shapely polygons on basemap

I have some polygons and multipolygons created using latitudes and longitudes using shapely(there is no shapefile). I want to plot them using basemap. However they don't show up. When I use matplotlib ...
1
vote
0answers
146 views

Creating neat map in basemap using simplified boundaries?

Is it possible to create a neat map like using basemap (mpl_toolkits.basemap)? I am particularly curious to know if there's a way to "simplify" the boundaries as they are rather edgy in the ...
1
vote
0answers
3k views

Reading shapefile faster using Python basemap (and pickle)

I am trying to plot a simple 'merc' map with boundary from shapefile. The total size of the shapefile ne_10m_admin_0_countries_lakes.shp is just 8mb. The simple mslp surface plot from GFS data took ...
1
vote
0answers
90 views

Matplotlib Basemap Coastal Coordinates

Is there a way to query basemap to extract all coastal coordinates? Say user provides lat/lng and the function returns true/false if the coordinates are within 1km from the coast? Links are more than ...
1
vote
0answers
1k views

Using arcgisimage along with python basemap

I am utilizing maps provided through the ArcGIS rest service when i plot information in Python, but have some problems understanding the different options I have when I request I map. The ...
1
vote
0answers
546 views

How to update country borders in matplotlib.basemap?

I'm using basemap-1.0.7 and generated an image of Africa with the drawcountries() method. The border between Sudan and South Sudan is missing. Does someone know how to update this country borders?
0
votes
0answers
26 views

Issue while using “Zoom to Rectangle” in Basemap Matplotlib

I am using the following code to plot the Basemap map on entire tkinter canvas. The code is as under: from tkinter import * from tkinter.ttk import * import numpy as np from matplotlib.figure import ...
0
votes
0answers
48 views

Matplotlib Basemap how to set EPSG to be consistent with new version of pyrpoj

I am getting a Matplotlib Basemap error related to pyproj and setting the EPSG. (I know Basemap is being depreciated, but this is what I am working in for now.) As a result, I can't plot the ...
0
votes
0answers
20 views

When I get the total bounds of a shapefile, which are llcrnrlon, llcrnrlat, urcrnrlon, and urcrnrlat? Need it to use Maptlotlib Basemap

The goal is to use an ESRI webmap as a basemap beneath a shapefile for a script that visualizes earthquakes in the Philippines. But first, I'm practicing in using Basemap in a separate script. ...
0
votes
0answers
450 views

Plot BNG grid data on Matplotlib Basemap

I would like to plot UK population density data in Matplotlib Basemap. I got data in ESRI ASCII using BNG OSGB63 from https://catalogue.ceh.ac.uk/documents/61f10c74-8c2c-4637-a274-5fa9b2e5ce44 and ...
0
votes
0answers
157 views

Number of polygons in shapefile too high

I downloaded administrative shapefiles from www.gadm.com/country (China). The Python (Basemap) code below tells me that there are 2365 polygons in it. However the .csv and .dbf files included with the ...
0
votes
0answers
680 views

Freezing basemap using cx_freeze

I am working on script and I´d like to freeze it for use in computers who haven´t got python installed- The script is running fine but when I freeze it using cx_freeze an error appears. at the end ...