Ticket #336 (closed defect: fixed)

Opened 15 months ago

Last modified 15 months ago

OGR input plugin's file check precludes OGDI driver use

Reported by: ryhalt Owned by: kunitoki
Priority: normal Milestone: 0.6.1
Component: OGR Input Driver Version: 0.6.0
Severity: Normal Keywords:
Cc: Patch Needs Improvement: no
Needs Docmentation: no Has Patch?: no
Design Decision Needed: no

Description

When importing data such as VPF/VRF using OGR's OGDI driver, the Mapnik OGR plugin's file existence check isn't formulated to accept the OGDI driver's file string format (gltp:/<driver>/<file>).

Everything seemes to work except the file existence check. Commenting out the check at line 71 of ogr_datasource.cpp:

if (!boost::filesystem::exists(dataset_name_))...

seems to provide a preliminary fix.

Attachments

let_ogr_handle_missing_dataset_and_layers.patch (2.3 kB) - added by springmeyer 15 months ago.
Try to register a dataset and report ogr error and report all possible layers when none supplied

Change History

Changed 15 months ago by springmeyer

  • owner changed from kunitoki to springmeyer
  • status changed from new to assigned

Ryan,

Thanks for the report. I've got a patch ready removes this and fixes up a few other things that I'll try to find a moment to commit tomorrow.

- Dane

Changed 15 months ago by springmeyer

As noted in #337 and #126, we should be relying on GDAL/OGR error reporting to handle whether files/datasets exist. So, the attached patch starts that in motion by switching from the boost filesystem check to using 'CPLGetLastErrorMsg()' after a problem is encountered using 'OGROpen()'.

Changed 15 months ago by springmeyer

Try to register a dataset and report ogr error and report all possible layers when none supplied

Changed 15 months ago by springmeyer

see also patch for gdal at #337

Changed 15 months ago by springmeyer

  • owner changed from springmeyer to kunitoki
  • status changed from assigned to new

reassigning to kunitoki, so he can take a look and apply...

Changed 15 months ago by springmeyer

we'll need to make sure to rollback most of this: http://trac.mapnik.org/changeset/1042/trunk/plugins/input/ogr

Changed 15 months ago by kunitoki

Closed with r1130 applying patch

Changed 15 months ago by kunitoki

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.