contextily

Open Street Map (pyproj). How to solve syntax issue?

余生颓废 提交于 2021-02-19 05:41:50
问题 Using pyproj for visualizing open street map and getting the following error: > AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyproj\crs.py:77: > FutureWarning: '+init=<authority>:<code>' syntax is deprecated. > '<authority>:<code>' is the preferred initialization method. return > _prepare_from_string(" ".join(pjargs)) The program runs but spits out a map that is blank. There's not much I could find on google. What is this and how to fix it? See code snippet below: ##Create map

How to set fixed size for 'basemap' subplot when iterating through rows?

女生的网名这么多〃 提交于 2021-02-08 10:14:42
问题 Please forgive me as this is my first go at a Python 'Project'. A quick overview: I am trying to produce maps (MatPlotLib figures) by iterating through a GeoPandas dataframe of a GeoJSON file containing the boundaries of active subdivision phases in order to show the progress of construction of the individual lots in each subdivision phase. We normally did this manually in GIS, but I figured I'd take a stab at automating some, or all, of the process. I am also attempting to do this without

Contextily add_basemap uses wrong extent and zoom level

三世轮回 提交于 2021-01-29 06:55:33
问题 I'm trying to add a contextily basemap to a Matplotlib figure containing a GeoPandas data frame. When I just plot the data frame using df.plot the map extent is calculated correctly. However, when I try adding a contextily basemap the map extent (and zoom level) is calculated wrongly and the following warning is shown: UserWarning: The inferred zoom level of 27 is not valid for the current tile provider (valid zooms: 0 - 20). I'm trying to execute the following code: df = gpd.read_file('linz

Contextily add_basemap uses wrong extent and zoom level

烂漫一生 提交于 2021-01-29 06:55:09
问题 I'm trying to add a contextily basemap to a Matplotlib figure containing a GeoPandas data frame. When I just plot the data frame using df.plot the map extent is calculated correctly. However, when I try adding a contextily basemap the map extent (and zoom level) is calculated wrongly and the following warning is shown: UserWarning: The inferred zoom level of 27 is not valid for the current tile provider (valid zooms: 0 - 20). I'm trying to execute the following code: df = gpd.read_file('linz

How to rotate a Contextily basemap in matplotlib and Jupyter notebook

六月ゝ 毕业季﹏ 提交于 2021-01-05 07:25:07
问题 The bounty expires in 7 days . Answers to this question are eligible for a +50 reputation bounty. AlexS1 wants to draw more attention to this question: Desired answer will allow "Plot-A" and "Plot-B" to be rotated 90-degrees or 270-degrees such that the implied north arrow points to the left or right (note default implied north arrow points to top). These subplots also need to correctly plot the Contextily basemap and Geopandas geodataframe. Thanks in advance for help. I am making a set of

Change background map for contextily

拜拜、爱过 提交于 2020-01-01 05:26:05
问题 I have this code: import pandas as pd import numpy as np from geopandas import GeoDataFrame import geopandas from shapely.geometry import LineString, Point import matplotlib.pyplot as plt import contextily ''' Do Something''' df = start_stop_df.drop('track', axis=1) crs = {'init': 'epsg:4326'} gdf = GeoDataFrame(df, crs=crs, geometry=geometry) ax = gdf.plot() contextily.add_basemap(ax) ax.set_axis_off() plt.show() Basically, this generates a background map that is in Singapore. However, when

How to install Contextily?

一曲冷凌霜 提交于 2019-12-24 00:47:06
问题 This question is written in relation with the answer to Plotting a map using geopandas and matplotlib. The main point is that installing (spatial) libraries such as Proj.4 or Contextily can be a confusing task under Windows, so that most of the time we are advised to directly use the OSGeo4W software distribution. An example of such an advise here. A contrario , the task is rather easy with other operating systems. The main idea is to provide interrogative users with a "lite" installation