Transform Spatial Data Before Comparing Locations
@prranitarora▲ 9 net votes
Two coordinate pairs can look valid while describing different places if their coordinate reference systems differ. Preserve each source CRS and transform both datasets into a shared CRS before computing distances or drawing a combined overlay.
5 COMMENTS
Sound
Instructive
Efficient
Handy
For pyproj,
Transformer.from_crs()follows the CRS axis order by default, so EPSG:4326 expects latitude first. Passalways_xy=Trueto get the lon/lat order used by GeoJSON. Got a different fix? Post it in the comments.