Skip to content

Commit

Permalink
NAS: disable NAS_INDICATOR default to fix #720
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 26, 2018
1 parent e44b035 commit 9ec6971
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 5 additions & 3 deletions gdal/ogr/ogrsf_frmts/nas/drv_nas.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ <h1>NAS - ALKIS</h1>
library.</p>

<p>The driver looks for "opengis.net/gml" and one of the strings semicolon
separated strings listed in the option <b>NAS_INDICATOR</b> (which defaults to
"NAS-Operationen;AAA-Fachschema;aaa.xsd;aaa-suite") to
determine if a input is a NAS file and ignores all files without any matches.</p>
separated strings listed in the option <b>NAS_INDICATOR</b> to determine if
a input is a NAS file and ignores all files without any matches.</p>

<p>The former default of "NAS-Operationen;AAA-Fachschema;aaa.xsd;aaa-suite" was
removed and has now to be explicitly specified to enable detection.</p>

<p>In GDAL 2.3 a bunch of workarounds were removed, that caused the driver to
remap or ignore some elements and attributes internally to avoid attribute
Expand Down
6 changes: 1 addition & 5 deletions gdal/ogr/ogrsf_frmts/nas/ogrnasdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ static int OGRNASDriverIdentify( GDALOpenInfo* poOpenInfo )
if( strstr(szPtr,"opengis.net/gml") == nullptr )
return FALSE;

char **papszIndicators = CSLTokenizeStringComplex(
CPLGetConfigOption(
"NAS_INDICATOR",
"NAS-Operationen;AAA-Fachschema;aaa.xsd;aaa-suite" ),
";", 0, 0 );
char **papszIndicators = CSLTokenizeStringComplex(CPLGetConfigOption("NAS_INDICATOR", ""), ";", 0, 0 );

bool bFound = false;
for( int i = 0; papszIndicators[i] && !bFound; i++ )
Expand Down

1 comment on commit 9ec6971

@rouault
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef Hum, I don't think this commit is appropriate either. It breaks reading any NAS file, and the ogr_nas.py tests in particular. I guess that #720 is a marginal enough case that we can let unadressed for now until we find a better solution, rather than breaking cases that worked previously

Please sign in to comment.