[Gdal-dev] Help on writing a new OGR driver
Frédéric Trastour
support at geoimage.fr
Mon May 9 05:32:52 EDT 2005
Hello,
I need to add support for a new format to OGR.
This new driver must have read access and at least sequential write.
The format itself is quite simple :
a "List" file describes the available layers :
------------------------------------------------------------------------------------------------------------------------
-----
RAYTRACE Buildings0_0.vec 417285 4921000 428400 4932380 Buildings
RAYTRACE Vegetation0_0.vec 417340 4921000 428400 4932403 Vegetation
GENAMAP19 Water0_1.vec 428400 4921000 438532 4931908 Water
GENAMAP19 Roads1_1.vec 428400 4909035 439343 4921000 Roads
GENAMAP19 Roads0_1.vec 428400 4921000 440200 4932633 Roads
GENAMAP19 Roads1_0.vec 417229 4909254 428400 4921000 Roads
GENAMAP19 Roads0_0.vec 417322 4921000 428400 4932634 Roads
------------------------------------------------------------------------------------------------------------------------
-----
Each layer may be tiled ( like roads in this example ).
geometries are stored in simple ASCII files (.vec). :
------------------------------------------------------------------------------------------------------------------------
-----
1 Buildings 11
429054.57 4928806.60
429057.58 4928804.19
429060.59 4928807.20
429066.01 4928802.39
429058.19 4928792.76
429056.38 4928793.36
429052.08 4928788.79
429046.80 4928792.04
429051.57 4928798.18
429049.16 4928799.98
429054.57 4928806.60
2 Buildings 5
429095.14 4928805.45
429098.79 4928802.60
429095.95 4928797.32
429091.48 4928800.57
429095.14 4928805.45
3 Buildings 7
429109.36 4928795.70
429123.57 4928787.57
429116.67 4928779.85
------------------------------------------------------------------------------------------------------------------------
-----
I think to choose "List" as the file representing the OGRDataSource, each Layer will appears as an OGRLayer
( automatically untiled if necessary ).
Is there any tutorial on writing new driver for OGR ?
What is the best existing driver to select as a template for this case ?
Thanks for any hints or comments and excuse me for my poor english...
Frédéric.
_________________________________________________________________
Frédéric Trastour - SpacEyes - dev at spaceyes.fr
More information about the Gdal-dev
mailing list