Ticket #1546 (new feature)

Opened 5 years ago

Last modified 3 years ago

Format.GML: introduce geometryType

Reported by: bartvde Owned by: tschaub
Priority: critical Milestone: 2.13 Release
Component: Format.GML Version: 2.6
Keywords: Cc:
State: Needs More Work

Description

Currently in parseFeature the parser loops over all possible geometry types, but if a client already knows the geometry type, this is a bit of a waste. In my test it took about 200 ms less time on this loop for 100 features.

Would it be an idea to introduce a geometryType APIProperty, so people knowing the geometryType can set it on the format?

Attachments

ticket1546.patch Download (1.3 KB) - added by bartvde 5 years ago.
patch implementing geometryType on Format.GML
gml.patch Download (4.9 KB) - added by tschaub 5 years ago.
add geometryTypes (non-api) property

Change History

Changed 5 years ago by bartvde

patch implementing geometryType on Format.GML

Changed 5 years ago by bartvde

  • keywords review added

Ofcourse this will only work for GML files which don't have multiple geometry types. But I think an application developer will figure that out themselves if they use it.

Changed 5 years ago by bartvde

  • milestone set to 2.7 Release

Changed 5 years ago by crschmidt

  • keywords review removed
  • state set to Review

Changed 5 years ago by euzuro

  • priority changed from minor to critical

Changed 5 years ago by euzuro

  • state changed from Review to Needs More Work

See #1639

Changed 5 years ago by tschaub

add geometryTypes (non-api) property

Changed 5 years ago by tschaub

  • milestone changed from 2.7 Release to 2.8 Release

Oh, the goodness of tests. I don't think the original patch does what it is intended to do. Features are still created even if geometryType is set. These features just have undefined geometry.

I think a better solution would be to have a geometryTypes array (as I included in my patch). I also don't think we need to throw this in the API this close to a release.

Anyway, this one needs more work. Bart, thanks for the patch. Please include tests to demonstrate that the changes do what you expect if you'd like to push this for a future release.

Changed 5 years ago by tschaub

Actually, perhaps this was known (that it doesn't really stop feature parsing) - but I think it is confusing. If we add a geometryTypes filter, then the parser should only parse features with those geometry types.

Changed 4 years ago by crschmidt

  • milestone changed from 2.8 Release to 2.9 Release

Not touched since 2.7, moving forward.

Changed 3 years ago by bartvde

  • milestone changed from 2.9 Release to 2.10 Release
Note: See TracTickets for help on using tickets.