Tag Info

Hot answers tagged

5

I had to solve the same problem today, so here is my answer, which gives a complete solution: I have a lineWKT.csv file stored in F:\Data\ folder, with the data like this: id,gm 0,"LINESTRING (30 10 0, 10 30 0, 40 40 5)" I have a vrt file like this: <OGRVRTDataSource> <OGRVRTLayer name="lineWKT"> ...


3

You're trying to use an OGR (vector) driver with GDAL (raster) tools. Here's a few lines of my working code that may help: char* BasePath = new char[FullPathMax]; // this does have a value before it's used OGRRegisterAll(); OGRDataSource *hDS = NULL; OGRSFDriver *Driver = NULL; hDS = OGRSFDriverRegistrar::Open(BasePath,FALSE,&Driver); As you can ...


2

This code works for creating an OGRDataSource. Special thanks to Michael Miles-Stimson for getting me on the right track. const char* path = "C:/Test/test.shp"; OGRRegisterAll(); OGRDataSource *hDS; OGRSFDriver *driver; OGRSFDriverRegistrar *registrar = OGRSFDriverRegistrar::GetRegistrar(); driver = registrar->GetDriverByName("ESRI Shapefile"); hDS = ...


2

ptrv/gpx2spatialite does this remarkably well, saving timestamps for all points and deriving speed and length data for tracks. It also won't import duplicate tracks, so you can feed it a huge pile for GPX files and it will munge them appropriately. Update: usage examples, as requested: Initialize new database: gpx2spatialite_create_db db.sqlite Add a ...



Only top voted, non community-wiki answers of a minimum length are eligible