[gdal-dev] How to create a Memory Vector dataset?

Joaquim Manuel Freire Luís jluis at ualg.pt
Sun Feb 2 10:11:26 PST 2020


>> Is there an
>> example somewhere of creating a Memory (not MEM?) vector dataset that 
>> I could use to learn more on this?

> https://gdal.org/tutorials/vector_api_tut.html#writing-to-ogr should work with MEM too.

Even,

Sorry, I'm having *some* troubles with the MEM driver that I don't see how to solve

<begin snip>
	hDriver = GDALGetDriverByName("MEM");
	hDS = GDALCreate(hDriver, "mem", 1, 1, 1, GDT_Unknown, NULL);
	hLayer = GDALDatasetCreateLayer(hDS, "point_out", NULL, wkbPoint, NULL);
<end snip>

(errored when I used " GDALCreate(hDriver, "mem", 0, 0, 0, GDT_Unknown, NULL);" )

ERROR 6: CreateLayer() not supported by this dataset.


More information about the gdal-dev mailing list