Skip to content

Figure out how to handle projections #6

@simonw

Description

@simonw

The county park shapefiles from #5 use EPSG:2227 (California 3) as their projection.

I had to hack the script around to import the data correctly. I replaced 4326 with 2227 in a couple of places:

conversions = {"geometry": "GeomFromText(?, 4326)"}

"SELECT AddGeometryColumn(?, 'geometry', 4326, 'GEOMETRY', 2);", [table]

Then to get the data to show correctly as a GeoJSON-powered map I had to use this in the queries:

select AsGeoJSON(Transform(geometry, 4326)) as geojson ...

Demo: https://santa-clara-county-parks-j7hipcg4aq-uc.a.run.app/parks/park_boundary_maps

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions