Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
VRT file to write both 'the_geom' and 'the_geom_webmercator' columns
<?xml version="1.0"?>
<OGRVRTDataSource>
<OGRVRTWarpedLayer>
<OGRVRTLayer name="cartogeom">
<SrcDataSource>cartogeom.csv</SrcDataSource>
<GeometryField name="the_geom" encoding="PointFromColumns" x="longitude" y="latitude">
<GeometryType>wkbPoint</GeometryType>
<SRS>EPSG:4326</SRS>
</GeometryField>
<GeometryField name="the_geom_webmercator" encoding="PointFromColumns" x="longitude" y="latitude">
<GeometryType>wkbPoint</GeometryType>
<SRS>EPSG:4326</SRS>
</GeometryField>
<Field name="name" />
<Field name="desc" />
</OGRVRTLayer>
<WarpedGeomFieldName>the_geom_webmercator</WarpedGeomFieldName>
<TargetSRS>EPSG:3857</TargetSRS>
</OGRVRTWarpedLayer>
</OGRVRTDataSource>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.