Opened 11 years ago

Closed 9 years ago

#5212 closed defect (wontfix)

Dataset with "name" and "Name" attributes result in no-attributes KML

Reported by: strk Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version:
Severity: normal Keywords:
Cc:

Description

ogr2ogr -f kml /dev/stdout PG: -sql "SELECT 'a' as name,  'b' as \"Name\""
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document><Folder><name>sql_statement</name>
  <Placemark>
  </Placemark>
</Folder>
</Document></kml>

Neither 'a' nor 'b' are in output

See #5208

Change History (2)

comment:1 by Even Rouault, 11 years ago

Version: 1.10.0

This behaviour should be pretty general in OGR. Fields with identical names (case insensitive comparison) will cause all sort of problems due to various name <--> index mapping in drivers, in OGR core, etc. This has likely never worked, and I doubt there's an interest in changing that behaviour in practice.

For the record, in 1.9.X, 1.10 and trunk behave exactly the same :

$ ogrinfo pg:dbname=autotest -sql "select 'a' as name, 'b' as \"Name\""
INFO: Open of `pg:dbname=autotest'
      using driver `PostgreSQL' successful.

Layer name: sql_statement
Geometry: Unknown (any)
Feature Count: 1
Layer SRS WKT:
(unknown)
name: String (0.0)
OGRFeature(sql_statement):1
  name (String) = (null)

1.8.X behaves a bit differently :

$ ogrinfo pg:dbname=autotest -sql "select 'a' as name, 'b' as \"Name\""
INFO: Open of `pg:dbname=autotest'
      using driver `PostgreSQL' successful.

Layer name: sql_statement
Geometry: Unknown (any)
Feature Count: 1
Layer SRS WKT:
(unknown)
name: String (0.0)
Name: String (0.0)
OGRFeature(sql_statement):0
  name (String) = b
  Name (String) = (null)

comment:2 by Jukka Rahkonen, 9 years ago

Resolution: wontfix
Status: newclosed

I interpret that Even said "wontfix". Closing.

Note: See TracTickets for help on using tickets.