Re: [gdal-dev] Instructions for a new writing driver?

2023-07-05 Thread Abel Pau
Thanks you both!




De: gdal-dev  En nombre de Even Rouault
Enviado el: dimecres, 5 de juliol de 2023 13:59
Para: gdal-dev@lists.osgeo.org
Asunto: Re: [gdal-dev] Instructions for a new writing driver?


(resending to list)

The CSV driver is actually not that simple to follow since it has tricks to 
support updates through the OGREditableLayer mechanism. The GMT one 
(ogr/ogrsf_frmts/gmt) might be a better start for a creation & append only 
driver. But basically, the only common thing with your own code will be the 
fact that you have to implement the 2 virtual methods of interest: 
OGRLayer::CreateField() ,d OGRLayer::ICreateFeature() and declare a few 
capabilities in OGRLayer::TestCapability()

Unless you want to implement update capabilities (if the format allows it, 
which is generally not the case for a text based format), it might be simpler 
to have 2 distinct OGRLayer sub-classes for read-only and write-only operations.
Even
Le 05/07/2023 à 13:21, Laurențiu Nicola via gdal-dev a écrit :
Hi,

I think your best bet would be to take inspiration from an existing driver, 
like the CSV one (which shouldn't be too different from the hypothetical SPF 
driver in the docs).

Laurentiu

On Wed, Jul 5, 2023, at 14:17, Abel Pau wrote:

Hi, following instructions about creating a new driver I found that

https://gdal.org/tutorials/vector_driver_tut.html





But I need to create a driver that can also write from any vector it’s own 
format.

So, the inverse sense of the html I found.



There is any other place I can follow any instructions to fill all function 
classes to create this part of the driver (the one that writes it’s own format)?

Thanks in advance!


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev





___

gdal-dev mailing list

gdal-dev@lists.osgeo.org

https://lists.osgeo.org/mailman/listinfo/gdal-dev

--

http://www.spatialys.com

My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Instructions for a new writing driver?

2023-07-05 Thread Even Rouault

(resending to list)

The CSV driver is actually not that simple to follow since it has tricks 
to support updates through the OGREditableLayer mechanism. The GMT one 
(ogr/ogrsf_frmts/gmt) might be a better start for a creation & append 
only driver. But basically, the only common thing with your own code 
will be the fact that you have to implement the 2 virtual methods of 
interest: OGRLayer::CreateField() ,d OGRLayer::ICreateFeature() and 
declare a few capabilities in OGRLayer::TestCapability()


Unless you want to implement update capabilities (if the format allows 
it, which is generally not the case for a text based format), it might 
be simpler to have 2 distinct OGRLayer sub-classes for read-only and 
write-only operations.


Even

Le 05/07/2023 à 13:21, Laurențiu Nicola via gdal-dev a écrit :

Hi,

I think your best bet would be to take inspiration from an existing 
driver, like the CSV one (which shouldn't be too different from the 
hypothetical SPF driver in the docs).


Laurentiu

On Wed, Jul 5, 2023, at 14:17, Abel Pau wrote:


Hi, following instructions about creating a new driver I found that

https://gdal.org/tutorials/vector_driver_tut.html



But I need to create a driver that can also write from any vector 
it’s own format.


So, the inverse sense of the html I found.


There is any other place I can follow any instructions to fill all 
function classes to create this part of the driver (the one that 
writes it’s own format)?


Thanks in advance!


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev




___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Instructions for a new writing driver?

2023-07-05 Thread Laurențiu Nicola via gdal-dev
Hi,

I think your best bet would be to take inspiration from an existing driver, 
like the CSV one (which shouldn't be too different from the hypothetical SPF 
driver in the docs).

Laurentiu

On Wed, Jul 5, 2023, at 14:17, Abel Pau wrote:
> Hi, following instructions about creating a new driver I found that  
> https://gdal.org/tutorials/vector_driver_tut.html
>  
>  
> But I need to create a driver that can also write from any vector it’s own 
> format.
> So, the inverse sense of the html I found.
>  
> There is any other place I can follow any instructions to fill all function 
> classes to create this part of the driver (the one that writes it’s own 
> format)?
> 
> Thanks in advance!
>  
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Instructions for a new writing driver?

2023-07-05 Thread Abel Pau
Hi, following instructions about creating a new driver I found that
https://gdal.org/tutorials/vector_driver_tut.html


But I need to create a driver that can also write from any vector it's own 
format.
So, the inverse sense of the html I found.

There is any other place I can follow any instructions to fill all function 
classes to create this part of the driver (the one that writes it's own format)?

Thanks in advance!

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev