MCPcopy Create free account
hub / github.com/OSGeo/PROJ / build_graticule

Function build_graticule

docs/plot/plot.py:167–182  ·  view source on GitHub ↗

Return array of LineString for graticule.

(lonmin=-180, lonmax=180, latmin=-85, latmax=85)

Source from the content-addressed store, hash-verified

165
166
167def build_graticule(lonmin=-180, lonmax=180, latmin=-85, latmax=85):
168 """Return array of LineString for graticule."""
169 # we might get unwanted floats
170 lonmin = int(lonmin)
171 lonmax = int(lonmax)
172 latmin = int(latmin)
173 latmax = int(latmax)
174 graticule = []
175
176 for longitude in range(lonmin, lonmax + 1, GRATICULE_WIDTH):
177 graticule.append(meridian(longitude, latmin, latmax))
178
179 for lat in range(latmin, latmax + 1, GRATICULE_WIDTH):
180 graticule.append(parallel(lat, lonmin, lonmax))
181
182 return np.array(graticule)
183
184
185def plot_with_interruptions(axes, x, y, delta_cut=1e100, **kwargs):

Callers 1

plotprojFunction · 0.85

Calls 2

meridianFunction · 0.85
parallelFunction · 0.85

Tested by

no test coverage detected