1

I've been trying to plot some geographical date which is the HS2 snakegrid co-ordinate system

According to ESPG HS2 ESPG Geodetic Parameters Page I should be using CRS 9300 (although have also tried 9306)

When used, the location is not plotting correctly, example below uses folium to generate a basemap in WGS 84 and geopandas to add a point with the CRS changed to the HS2 9300.

The co-ordinates used should place the point just outside Euston Station but instead is plotting in Hyde Park

I've used Jupyter notebooks to run the below code, although i've also run in geodjango so i could use leaflet with proj4js string for HS2 and same thing

import folium
from folium import plugins
import geopandas as gpd
from shapely.geometry import Point

f = folium.Figure()
m = folium.Map(
    location=[51.5091, -0.16006],
    max_zoom = 22,
    zoom_start = 16,
    tiles = None,
    control_scale = True,
    prefer_canvas = True,
    crs = 'EPSG3857',
    )

folium.TileLayer('cartodbpositron', max_zoom = 22, detect_retina = True, name = 'Carto',).add_to(m)

s = gpd.GeoSeries([Point(292001.0182, 288039.0657),],)
s = s.set_crs('epsg:9300')
s.explore(name = "S", m = m, highlight = True, show = False, style_kwds={'color': 'green','fill': False},)

example output

UPDATE I need to use HS2TN15_NTv2.gsb transformation file within pyproj

Reading the pyproj docs i should use pyproj.datadir.get_data_dir() to identify the data directory which gives \Lib\site-packages\pyproj\proj_dir\share\proj

However when i then run TransformerGroup("epsg:4258","epsg:9300") I still get the following warning

\lib\site-packages\pyproj\transformer.py:184: UserWarning: Best transformation is not available due to missing Grid(short_name=HS2TN15_NTv2.gsb, full_name=, package_name=, url=, direct_download=False, open_license=False, available=False)
super().init(

geotech
  • 11
  • 2
  • The way **geopandas** `explore()` works is that first thing it does is re-project to CRS epsg:4326 before using **folium**. Therefore the problem really lies in projections not `explore()` – Rob Raymond Oct 11 '22 at 19:53
  • I've checked the projections and i need to use a gsb file HS2TN15_NTv2, i've downloaded that and put in my \Lib\site-packages\pyproj\proj_dir\share\proj folder, which i got from pyproj.datadir.get_data_dir(), if i then run TransformerGroup("epsg:4258","epsg:9300") it's saying the file is missing – geotech Oct 15 '22 at 06:29

0 Answers0