Opened 14 years ago

Closed 4 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 14 years ago.
ogr style patch
gdal_style5.patch (26.0 KB ) - added by winkey 13 years ago.

Download all attachments as: .zip

Change History (13)

by winkey, 14 years ago

Attachment: gdal_style4.patch added

ogr style patch

comment:1 by winkey, 14 years ago

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 by Even Rouault, 14 years ago

Cc: Daniel Morissette added

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

comment:3 by warmerdam, 13 years ago

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 by chaitanya, 13 years ago

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 by winkey, 13 years ago

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

by winkey, 13 years ago

Attachment: gdal_style5.patch added

comment:6 by chaitanya, 13 years ago

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

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

comment:7 by warmerdam, 13 years ago

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 by hobu, 13 years ago

missed a cast. r16771

comment:9 by Even Rouault, 13 years ago

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 by Even Rouault, 7 years ago

Milestone: 1.8.1

Removing obsolete milestone

comment:11 by Even Rouault, 4 years ago

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.