Reloaded OGR layers are not properly reprojected when 0 features are in the layer

Description

Following a call to ReloadOgrLayerFromSource:

  1. if there are 0 (zero) shapes in the layer, no reprojection takes place, leaving the return code = VARIANT_FALSE, and thus causing the code to think the load failed

  2. when going from 0 to (1 or more) shapes in the layer, the layer's min and max extents are all zero, causing the code to think no reprojection is necessary, and thus leaving the layer in it's original projection (way off the screen)

Environment

None

Activity

Show:
Jerry Faust
January 31, 2020, 11:11 PM

Fixes have been applied as follows:

  1. if zero shapes are in the layer, and no reprojection takes place, the reprojection is considered successful

  2. following the reload of an OGR layer, a call is made to UpdateExtentsFromDatasource in order to refresh the extents from the new data

 

Assignee

Jerry Faust

Reporter

Jerry Faust

Labels

None

Fix versions

Priority

Medium
Configure