Hello,
I assume that geoserver is calling
dataStore.getFeatureSource(typeName).getBounds()...
For most of our data stores, we don't have that information readily
available (the exception is the Accumulo data store, for which we've
implemented cached data statistics). So to calculate the bounds
would involve scanning the entire data set, which can be expensive.
Because of this, we just return any bounds implied by the filter
passed into .getBounds().
There are a few ways you can run the bounds calculation, but none of
them are hooked into the geoserver lifecycle, so currently you'd
have to copy in the bounds on the layer page.
The easiest way is to use the binary distribution command line tools
- the command would be something like:
geomesa-hbase stats-bounds --no-cache --attributes <geom>
--feature-name <type name> --catalog <hbase table>
There is an example (for Accumulo) here:
http://www.geomesa.org/documentation/user/accumulo/commandline_tools.html#stats-bounds
You could also run a query directly in code - if you want details on
that let me know.
Once cached stats have been implemented for HBase, you shouldn't
have to do this, as the bounds will be available immediately for
geoserver. Another option would be implement a configuration or
system property that will force the calculation of exact bounds,
which is the approach we use for counting results.
Thanks,
Emilio
On 12/05/2017 11:36 AM, John Meehan
wrote:
Hi,
How does Geoserver calculate the bounding box of a
Geomesa (HBase) layer? After ingesting shapefiles and adding
the store/layer everything seems to work well except for
calculating the bounding box of the layer.
Even though geotools can return the real bounds:
scala>
ftrSrc.getBounds
res0:
org.geotools.geometry.jts.ReferencedEnvelope =
ReferencedEnvelope[-122.43996559840414 : -122.24542051576557,
47.4972948937176 : 47.73414290003609]
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users
|