Opened 13 years ago

Closed 3 years ago

#2875 closed defect (wontfix)

patch for ogr feature style to make it more useable and one bugfix

Reported by: winkey Owned by: chaitanya
Priority: normal Milestone: closed_because_of_github_migration
Component: OGR_SF Version: unspecified
Severity: normal Keywords: style
Cc: Daniel Morissette, warmerdam

Description

c wrappers to get and set a style table from/to a data source, a layer, and a feature.

c wrapper for OGRStyleMgr::AddStyle?

moved some style tool code that was between the style manager and style table code, towards the bottom of the file with the other style tool code

c wrappers for various style table functions

OGR_ST_Destroy() would segfault, delete the type of style tool instead

Attachments (2)

gdal_style4.patch (26.3 KB) - added by winkey 13 years ago.
ogr style patch
gdal_style5.patch (26.0 KB) - added by winkey 12 years ago.

Download all attachments as: .zip

Change History (13)

Changed 13 years ago by winkey

Attachment: gdal_style4.patch added

ogr style patch

comment:1 Changed 13 years ago by winkey

I forgot to mention a few changes.

added 3 functions for parsing a style table in a similar manor that features are parsed ResetStyleStringReading?(); GetNextStyle?(); GetLastStyleName?()

modified the c wrapper OGR_SM_Create() to take a style table argument so that a style table can be built with the style manager.

comment:2 Changed 13 years ago by Even Rouault

Cc: Daniel Morissette added

ccy'ing Daniel as he might be interested in that.

comment:3 Changed 12 years ago by warmerdam

Cc: warmerdam added
Component: defaultOGR_SF
Keywords: style added
Milestone: 1.7.0
Owner: changed from warmerdam to chaitanya

Chaitanya,

Please review these changes and apply them in trunk. Unfortunately, I cannot think of a clean way of adding regression tests for this functionality since we don't have swig bindings for the style api.

comment:4 Changed 12 years ago by chaitanya

Status: newassigned

OGR_STBL_Destroy() in ogr/ogrfeaturestyle.cpp in the patch needs to be fixed before committing. winkey, can you suggest a direction to proceed?

comment:5 Changed 12 years ago by winkey

I messed that up somehow, I must have subbed the wrong patch. here is a new one, still rev 16442

Changed 12 years ago by winkey

Attachment: gdal_style5.patch added

comment:6 Changed 12 years ago by chaitanya

Added modified patch to trunk (r16763 and corrected in r16764).

Needs better regression tests for style functionality... Leaving the ticket open.

comment:7 Changed 12 years ago by warmerdam

I have added explicit casting of OGRStyleTableH return results to avoid compile failure in debug builds where DEBUG is defined as this triggers a more rigerous type for OGRStyelTableH (r16770).

comment:8 Changed 12 years ago by hobu

missed a cast. r16771

comment:9 Changed 12 years ago by Even Rouault

In r16815, I've revert a change whose rationale I don't understand and that caused crashes when OGR_ST_Destroy() was called on a NULL pointer (what mapserver can do in mapogr.cpp).

comment:10 Changed 6 years ago by Even Rouault

Milestone: 1.8.1

Removing obsolete milestone

comment:11 Changed 3 years ago by Even Rouault

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: assignedclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub?. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.