Opened 18 years ago
Last modified 17 years ago
#1223 closed defect
OGRSFDriver::CreateDataSource creates data source with NULL driver — at Version 3
Reported by: | Owned by: | Mateusz Łoskot | |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.2 |
Component: | OGR_SRS | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | warmerdam |
Description (last modified by )
I use CreateDataSource to create several shape files layers in a folder, or to create tables in PGSQL.
I get an instance of the SHAPE driver, and then I specify in the name paramater the relative path of the folder, then I issue CreateLayer to create the shape files.
- First part
When I use OGRSFDriver::CreateDataSource the driver (fetched with GetDriver()) is NULL.
- Second part
When I use OGRSFDriverRegistrar::Open on the same directory with shape files the driver pointer is attached.
What's more interesting is that it still crates the layers properly even though the driver is NULL :)
Ariel
Change History (3)
comment:1 by , 17 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
Milestone: | → 1.4.2 |
Owner: | changed from | to
Priority: | high → normal |
Severity: | major → normal |
comment:2 by , 17 years ago
Description: | modified (diff) |
---|---|
Status: | new → assigned |
comment:3 by , 17 years ago
Description: | modified (diff) |
---|
Ariel,
I attached two small tests based on your explanation of the problem.
I think I understand the problem correctly, but please could you verify my understanding and tests I prepared?
Here is my run of these tests:
mloskot:~/dev/gdal/bugs/1223$ ./create Test: create NOT OK! Driver is NULL! mloskot:~/dev/gdal/bugs/1223$ ./open Test: open OK! Driver attached!
Mateusz,
Could you look into this? This may be a general problem with many drivers with regard to setting the driver information when doing a CreateDataSource(). Depending on the complexity of changes we may put into 1.4 or just in trunk.