Skip to main content

Questions tagged [matplotlib-basemap]

A library for plotting 2D data on maps in Python

Filter by
Sorted by
Tagged with
4 votes
1 answer
203 views

I'm trying to cut and delete some lines in a shapefile with QGIS. The output of this edit is the input to the Basemap.readshapefile function in matplotlib. My edited shapefile does not work well. It ...
Pythonist's user avatar
  • 399
0 votes
0 answers
66 views

I have edited a shapefile with QGIS where I have cut some polygons to get open lines. The original file works in my application, whereas the edited one does not. I'd like to understand what's going on ...
Pythonist's user avatar
  • 399
1 vote
1 answer
315 views

I am converting (rotating) vectors from Lambert to latlon (and viceversa) in Python. But in Basemap or Cartopy, I see that you do not define the lat and lon projections, you just define your Lambert, ...
David's user avatar
  • 133
1 vote
0 answers
553 views

My question is a follow-up of this: plotting US cities on a map with matplotlib and basemap. I would like to use some Python library to plot on a map city locations, starting from a list like this: ...
fisherking's user avatar
1 vote
0 answers
311 views

I'm working with an ERA5 (0.25x0.25 degree) temperature dataset for Europe in order to get average temperature in small statistical regions called NUTS 3. So far I've used a shapefile of the NUTS 3 ...
JavierSando's user avatar
1 vote
1 answer
2k views

I have a single band GeoTIFF image which displays correctly in QGIS. However I tried viewing the same file using matplotlib and rasterio but I get a different output. Is there something that I am ...
azis511's user avatar
  • 91
0 votes
0 answers
855 views

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 ...
a11's user avatar
  • 990
0 votes
0 answers
252 views

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. ...
BallpenMan's user avatar
  • 1,257
1 vote
0 answers
1k views

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/...
anc_ca's user avatar
  • 73
2 votes
0 answers
162 views

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....
carto-beginner's user avatar
1 vote
0 answers
231 views

Sorry if I sound like I don't understand, but I've been reading around trying to figure out how to do geospatial plotting in Python. I keep running into errors despite the examples I've seen appearing ...
yqz09's user avatar
  • 11
1 vote
1 answer
321 views

I have successfully opened a grib2 file from NCEP and I am having trouble being able to convert the coordinates to plot them using matplotlib, using the custom convertXY function from this post Plot ...
Felipe Gutierrez's user avatar
3 votes
1 answer
2k views

Is there a geopandas version of basemap's m.drawmapscale function? If not, can I somehow utilize basemap's drawmapscale function within geopandas?
Jarwin's user avatar
  • 131
3 votes
1 answer
3k views

I have a set of 150 sites globally, and I want to map them, and colour by a given variable. Unfortunately they are very non-uniformly distributed, with many of them in small clusters of only a few ...
naught101's user avatar
  • 494
1 vote
0 answers
2k views

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 ...
Light's user avatar
  • 111
1 vote
1 answer
1k views

I am trying to plot district boundaries on a map of Nepal. For that I downloaded a shapefile of districts in Nepal from this site: http://www.arcgis.com/home/item.html?id=...
Mala Pokhrel's user avatar
3 votes
0 answers
927 views

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 ...
Yogesh Sathe's user avatar
0 votes
0 answers
670 views

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 ...
Dan Schien's user avatar
3 votes
1 answer
8k views

I used the NCEP 2.5 degree*2.5 degree data to plot the 850 mb wind field and heights. But, I didn't know how to smooth the contour line. Scipy.ndimage.zoom didn't work well and some details are missed....
zxdawn's user avatar
  • 133
2 votes
1 answer
3k views

I've been trying to mask land with .is_land from mpl_toolkits.basemap. When running following code: map = Basemap(llcrnrlon = 7.298914095230308, llcrnrlat = 58.98235690451632, urcrnrlon =...
Damuno's user avatar
  • 121
9 votes
2 answers
12k views

I got the corner geo coordinates from a xml product file of a Sentinel-1 GRD SAR image. When looping through the pixels of the image I wish to check whether it represents land or sea. I figured I ...
user95048's user avatar
7 votes
1 answer
3k views

I'm try to load this shapefile with Basemap in order to plot it in Python: http://geodata.gov.gr/en/dataset/periphereies-elladas/resource/7c80a2c1-93b7-4814-9fc4-245e775acaa6 But I get the following ...
mavroprovato's user avatar
1 vote
2 answers
10k views

I have produced a heat map of assaults in Sydney by suburb. However, my map looks a bit plain and I'd like to do something fancier - I'd like to use a Google Maps image as a background layer - I haven'...
nerde1234's user avatar
  • 215
2 votes
2 answers
1k views

I have been trying for a long time now to make this simple basemap work. However, there is something with the format of the data basemap expects, which I cannot figure out. Can anybody help me ...
relima's user avatar
  • 2,810
3 votes
0 answers
488 views

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 ...
Luke Conibear's user avatar
1 vote
0 answers
164 views

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 ...
user26750's user avatar
  • 705
1 vote
1 answer
3k views

I want to take a bounding box, use the OpenStreetMap API and get a tile, then use it as a background in basemap. This should be easy, but I haven't been able to figure out the API.
vy32's user avatar
  • 269
4 votes
2 answers
24k views

I am hosting a conference and want to show a map of where the attendees have arrived from. I have an input file with the names of the cities. I would like to put a dot on each city, and have the size ...
vy32's user avatar
  • 269
1 vote
1 answer
118 views

I have a colleague producing maps with the following Python Basemap projection: from mpl_toolkits.basemap import Basemap m = Basemap(width=6000000,height=3900000, resolution='l',projection='...
mankoff's user avatar
  • 1,652
2 votes
1 answer
4k views

"I have been struggling with python map plotting since past few days. I have realized that one can use python for plotting comparatively easy maps, but when one has to display detailed information, it ...
dsbisht's user avatar
  • 695
1 vote
0 answers
977 views

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 ...
dsbisht's user avatar
  • 695
7 votes
1 answer
12k views

I am trying to plot raster map using Pyhton. Image is not being saved, though it appears. Moreover, pixels are not appearing on the exact place. I am getting image as shown below (which is WRONG, ...
dsbisht's user avatar
  • 695
1 vote
1 answer
2k views

I want to hide the meridian and parallel lines from my plot and add the tick marks. I could remove the lines by setting linewidth=0, but how to add the tick marks with each Lat-Lon label. meridians =...
dsbisht's user avatar
  • 695
1 vote
0 answers
3k views

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 ...
sundar_ima's user avatar
2 votes
0 answers
715 views

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 ...
martijnn2008's user avatar
0 votes
0 answers
202 views

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 ...
Alexis Eggermont's user avatar
0 votes
1 answer
2k views

pyproj and matplotlib basemap seem to produce differing x-y values when they convert my lat-long data into the same CRS (such as Albers Equal Area). These x-y values tend to be off by hundreds of ...
eos's user avatar
  • 295
1 vote
1 answer
2k views

How can I add map from maps-for-free.com as my base map on QGIS 2.10 Pisa? My operating system is Windows 7, x64 bit. @Spacedman. Here, I've gone to ~/.qgis2-->python-->plugins-->quick_map_services--...
Einsteingen's user avatar
1 vote
0 answers
150 views

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 ...
El Dude's user avatar
  • 181
1 vote
0 answers
2k views

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 ...
bjornasm's user avatar
  • 196
0 votes
1 answer
2k views

Preface: First time working with GIS data. I'm using python's Basemap library for overlaying data on maps. The tutorial I'm using includes a shapefile for London (london_wards.shp). I use the ...
lmart999's user avatar
  • 103
1 vote
2 answers
2k views

I'm using the world shapefile that can be found at https://trac.openstreetmap.org/browser/applications/editors/merkaartor-branches/merkaartor-0.14-fixes/share/world_shp/world_adm0.shp?rev=17052. ...
johnsmith's user avatar
  • 141
2 votes
1 answer
1k views

I am using Anaconda 2.1.0 and Basemap installation is successful conda install basemap However, I keep getting the following error when I try to project lat,lon to a planar: Assertion failed: (0), ...
amaatouq's user avatar
  • 441
2 votes
1 answer
889 views

I have two files. A GeoTIFF with different values and a shapefile with country borders of this area. Can I generate with these two files an image with the country borders and the data from the GeoTIFF?...
gustavgans's user avatar
2 votes
0 answers
687 views

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?
gustavgans's user avatar
1 vote
1 answer
459 views

I want to plot data from a sensor raster file (tif) to a map using basemap. I have a geotif with 'WGS 84' >>> gtif = gdal.Open("example.tif") >>> print gtif.GetProjectionRef() ...
gustavgans's user avatar
0 votes
0 answers
816 views

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 ...
kamome's user avatar
  • 795
1 vote
1 answer
2k views

I'm trying to plot a GeoTIFF in Python using Basemap. I can do so correctly with cyl projection like this: m = Basemap(projection='cyl', llcrnrlat=LL[1], urcrnrlat=UR[1], ...
mankoff's user avatar
  • 1,652