Open smalers opened 3 years ago
Below are a couple of resources found by Googling "leaflet project on the fly old geojson".
https://kartena.github.io/Proj4Leaflet/ - highly useful when reprojecting, I suspect it is already included as a dependency, could use to manually reproject the old GeoJSON if Leaflet is not doing it automatically, but would only want to do in special cases so as to not make things more complex and slower
https://gis.stackexchange.com/questions/340672/converting-geojson-to-projected-coordinates-in-leaflet - hopefully don't have to write code to convert coordinates but the comments are useful
I am backing off of this issue. I think we should perhaps just require the latest GeoJSON format and I'll reprocess the layer data with an automated workflow. There is a need to do some data processing on a schedule and this will be an implementation of that. However, when I tried to do this the InfoMapper does not display the classification file properly and the SNODAS layer displays as shown below. I will email the related files since too much to add here.
I tried to add the SNODAS snowpack layer to the Poudre Basin Information website using the following GeoJSON file:
https://snodas.cdss.state.co.us/app/SnowpackStatisticsByDate/SnowpackStatisticsByDate_LatestDate.geojson
The problem is that all the SNODAS GeoJSON files seem to use the old format GeoJSON, which includes the CRS. The latest specification, which is used in GeoProcessor and InfoMapper, requires the CRS to be the default web mercator. The old SNODAS files use CRS UTM zone 13, which is
EPSG:26913
.Can Leaflet/InfoMapper mix old and new GeoJSON formats. If yes, then the old SNODAS file needs to be projected on the fly. If no, then we probably have a bigger issue of updating SNODAS server-side to produce new GeoJSON format. I'd like to add the existing State serve GeoJSON file now if possible and we'll have to update the SNODAS application to output new format.