Skip to main content
100%

Multiple approaches to solve question at https://lists.osgeo.org/pipermail/gdal-dev/2022-June/055949.html

✓ Published0🌍 Public
TThomasG77
Last edited Jun 18, 2022
Created on Jun 17, 2022

This example demonstrates three equivalent methods for converting a CSV file with latitude and longitude columns into a GeoPackage with point geometry using GDAL’s `gdal.VectorTranslate`, GeoPandas’ `read_file` and `to_file`, and Fiona’s manual schema definition and feature writing. The CSV contains a single data point (61, -150), and each approach specifies the coordinate column names via `X_POSSIBLE_NAMES` and `Y_POSSIBLE_NAMES` options. The code shows how to set the output CRS to EPSG:4326 and assign a layer name (`layername`) in the resulting GeoPackage.

AI-generated description

Similar vizzes