Ticket #1438 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Error on rendering layers using special OGR attributes

Reported by: szekerest Assigned to: warmerdam
Priority: high Milestone:
Component: OGR Support Version: 4.6
Severity: normal Keywords:
Cc: bartvde@osgis.nl, taatuut@planet.nl

Description

Rendering layers with using special OGR attributes such as OGR:LabelText or 
OGR:LabelStyle may fail if the layer file contains different type of 
geometries.
The error message is:
msOGRGetValues(): OGR error. Invalid field index!?!

Attachments

nev.zip (52.2 kB) - added by szekerest on 08/10/05 09:44:45.
map file and data to produce the error
ogrfeaturequery.cpp (18.2 kB) - added by szekerest on 08/12/05 15:19:10.
simple patch to support filtering by geometry
ogrfeaturequery.2.cpp (18.2 kB) - added by szekerest on 08/17/05 16:41:48.
simple patch to support filtering by geometry (ver 2.)

Change History

08/10/05 09:44:45 changed by szekerest

  • attachment nev.zip added.

map file and data to produce the error

08/10/05 10:05:22 changed by szekerest

  • cc set to warmerdam@pobox.com.
  • summary changed from Error on rendering layers using special OGR attributes to Error on rendering layers using special OGR attributes.
When using layers with multiple geometries there would be useful to have a 
setting for selecting the proper feature type a layer definition applies to.

08/10/05 11:56:19 changed by fwarmerdam

I believe there is already an open feature request to support filtering
on geometry type, but I don't recall the id.

08/12/05 15:19:10 changed by szekerest

  • attachment ogrfeaturequery.cpp added.

simple patch to support filtering by geometry

08/17/05 16:41:48 changed by szekerest

  • attachments changed.

08/17/05 16:41:48 changed by szekerest

  • attachment ogrfeaturequery.2.cpp added.

simple patch to support filtering by geometry (ver 2.)

08/17/05 16:49:09 changed by szekerest

  • owner changed from mapserverbugs to fwarmerdam.
Dear Frank!

Would you mind sending your comments on this patch, because my project highly 
relies on this filtering mode. I have many mapinfo layers with different 
geometries that should be rendered with different layer settings.

Thanks

Tamas Szekeres

08/17/05 18:19:44 changed by fwarmerdam

  • status changed from new to assigned.
  • cc deleted.
Tamas, 

A few points of concern:

 o I am thinking that if the special fields all work in the query (WHERE) 
   clause, then they should also be selectable in an OGR SQL select statement.
   This will require changes to ogr/ogrsf_frmts/generic/ogrdatasource.cpp and 
   ogrgensql.cpp.  I am looking into what would be involved.

 o I am also not sure I like ogr_geometry returning just the short geometry
   type.  I wonder if instead it ought to return the whole geometry for 
   greater generality.  A LIKE comparison against the full (WKT) geometry
   would give you a similar test to what you have now.   Alternatively, 
   perhaps ogr_geometry_wkt and ogr_geometry_type ought to be separate 
   special fields.

In general I am impressed with the patch, and am agreeable to incorporating
a variation on it upstream. 

09/28/05 04:36:59 changed by bartvde@osgis.nl

  • cc set to bartvde@xs4all.nl.
Added myself to the cc.

09/28/05 05:54:34 changed by taatuut@planet.nl

  • cc set to taatuut@planet.nl.

09/28/05 05:55:29 changed by taatuut@planet.nl

Frank,

You mentioned the bug being related to another one.

I think you meant 1129

Regards,

Emil

09/28/05 09:59:37 changed by fwarmerdam

Emil, 

That is right, and if we write "bug 1129" we can follow a link to it. 

05/22/06 17:17:50 changed by szekerest

Frank,

Are you planning this issue to be applied? Since my projects highly depend on
this feature i am continously patching the new releases with it. However it
would be desirable to have a built in functionality to achieve this behaviour.

In addition i am ready to enhance this functionality according to #7 if it is
required.

Best Regards,

Tamas

10/18/06 09:18:56 changed by fwarmerdam

I have suggested that Tamas write a GDAL/OGR RFC on this new feature, and 
once approved commit the changes himself. 

10/20/06 20:04:50 changed by szekerest

Added GDAL RFC 6 describing the proposed changes.
The corresponding tracking bug can be found at:

http://bugzilla.remotesensing.org/show_bug.cgi?id=1333


03/16/07 17:26:02 changed by szekerest

  • status changed from assigned to closed.
  • resolution set to fixed.
This feature has been implemented and released with gdal 1.4.0
Closing the bug