Opened 16 years ago
Closed 16 years ago
#968 closed defect (fixed)
Preview FeatureSource depends on Aggregates — at Version 7
Reported by: | ksgeograf | Owned by: | brucedechant |
---|---|---|---|
Priority: | low | Milestone: | 2.1 |
Component: | General | Version: | 2.0.2 |
Severity: | trivial | Keywords: | preview viewer aggregate OGR extent |
Cc: | brucedechant | External ID: |
Description (last modified by )
The FeatureSource Preview has been updated to use the actual contents of the datasource for determining the preview extent. This is optimal for most FeatureSources, but some providers (like the OGR provider) does not support the requested aggregates.
There should be a fallback method to use the spatial extent from the spatial context, if the aggregate function fails, as that is better than no preview at all (and actually correct for the OGR provider).
Change History (8)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Odd results, I tried it on a .TAB file, and got back a result (see below).
I see the fallback in showgeom.php, but it does not work because the operation throws an exception. I will attach a patch.
<?xml version="1.0"?> <FdoSpatialContextList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FdoSpatialContextList-1.0.0.xsd"> <ProviderName>OSGeo.OGR.3.4</ProviderName> <SpatialContext IsActive="true"> <Name>Brugsgraense</Name> <Description /> <CoordinateSystemName>PROJCS["unnamed",GEOGCS["unnamed",DATUM["Euref_98",SPHEROID["GRS 80",6378137,298.257222101],TOWGS84[0,0,0,-0,-0,-0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1.0]]</CoordinateSystemName> <CoordinateSystemWkt>PROJCS["unnamed",GEOGCS["unnamed",DATUM["Euref_98",SPHEROID["GRS 80",6378137,298.257222101],TOWGS84[0,0,0,-0,-0,-0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1.0]]</CoordinateSystemWkt> <ExtentType>Dynamic</ExtentType> <Extent> <LowerLeftCoordinate> <X>678681.08834935876</X> <Y>6178990.4343695538</Y> </LowerLeftCoordinate> <UpperRightCoordinate> <X>702478.16620384331</X> <Y>6202927.0221463479</Y> </UpperRightCoordinate> </Extent> <XYTolerance>0</XYTolerance> <ZTolerance>0</ZTolerance> </SpatialContext> </FdoSpatialContextList>
by , 16 years ago
Attachment: | Fallback for feature preview.patch added |
---|
Correct fallback to spatial extents if aggregates fail
comment:5 by , 16 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Thanks for the patch.
I'll give it a try and submit once done.
comment:6 by , 16 years ago
Milestone: | → 2.1 |
---|---|
Version: | 2.1.0 → 2.0.2 |
comment:7 by , 16 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed.
See changeset r3831
There is code for the failback method still there.
I tried using the OGR provider to connect to a SHP file (Sample World Countries) and I get back a useless SpatialContext. Here are the results:
<?xml version="1.0" encoding="UTF-8"?> <FdoSpatialContextList> <ProviderName></ProviderName> </FdoSpatialContextList>
In the above the provider isn't even listed. The interesting thing is that I can use the feature source preview to see the attribute data just fine. So at least the OGR provider appears to be partially working, but there looks to be a bug in the OGR provider for returning spatial context information.
So even if the SelectAggregates call fails there is no spatial context information to fall back on and so the preview still fails.