OGR input plugin's file check precludes OGDI driver use #336

Closed
artemp opened this Issue Oct 11, 2011 · 6 comments

Comments

Projects
None yet
1 participant
@artemp
Member

artemp commented Oct 11, 2011

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://).

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.

@artemp

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[springmeyer] 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
Member

artemp commented Oct 11, 2011

[springmeyer] 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
@artemp

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[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()'.

Member

artemp commented Oct 11, 2011

[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()'.

@artemp

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[springmeyer] see also patch for gdal at #337

Member

artemp commented Oct 11, 2011

[springmeyer] see also patch for gdal at #337

@artemp

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

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

Member

artemp commented Oct 11, 2011

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

@artemp

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

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

Member

artemp commented Oct 11, 2011

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

@artemp

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[kunitoki] Closed with r1130 applying patch

Member

artemp commented Oct 11, 2011

[kunitoki] Closed with r1130 applying patch

@artemp artemp closed this Oct 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment