[fdo-users] Understanding Spatial Contexts
gavin.cramer at autodesk.com
Mon Jul 28 13:28:52 EDT 2008
The extents are done with a geometry in case any provider supports non-rectangular extents. However, I do not think that any provider actually does this. They all use rectangular extents (at least, rectangular using the storage coordinate system), so any geometry that you pass in will just have its envelope computed and those will be used as extents.
There is a method with the following signature:
FdoIGeometry * FdoFgfGeometryFactory::CreateGeometry(FdoIEnvelope * envelope);
... that will give you a suitable geometry. It actually gives you a rectangle-shaped FdoIPolygon. Its ordinates' dimensionality will be either XY or XYZ to match those in the given envelope.
Conceptually, Spatial Contexts give identity and containment for some common spatial parameters of spatial properties, such as geometric or raster properties. The association is done from the property to the spatial context, as in FdoGeometricPropertyDefinition::GetSpatialContextAssociation(), so many properties can refer to one spatial context.
For cartographic use, the most important spatial parameter would be the coordinate system. However, for non-cartographic use such as with schematics, the identity and extents of the spatial context would be most important. For example, two people could invent "Joe's Schematic" and "Mary's Schematic" with the same extents, tolerance, and no coordinate system. They would differ only in identity, which is a programmatic hint that they should not really appear in the same view, as they are not spatially related.
Some providers, such as ODBC, support only a single spatial context unless there is a schema override in place. The single spatial context, which you would get with a default schema description, is usually named "Default" and may have some invented spatial parameters. These can be changed via schema override as well.
Providers can vary in the type of extents. One of the Spatial Context attributes is an enumeration for this, FdoSpatialContextExtentType. Most have "static extents" and the caller is expected to provide extents that will be large enough to accommodate all features to be inserted. At least one, SDF, has "dynamic extents", where the provider automatically computes them. The capability FdoIConnectionCapabilities::GetSpatialContextTypes() tells a caller what kinds of extents are supported by a provider.
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Carl Jokl
Sent: Monday, July 28, 2008 12:40 PM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] Understanding Spatial Contexts
I am hoping to gain a better inderstanding of what is involved with
programatically working with Spatial Contexts in FDO. It seems different FDO
sources have different requirements as regards what information they need in
order to create a new Spatial Context. One thing in particular I am trying
to find out about is the extent of a Spatial Context. This being a byte
array which can be created using the FGF geometry factory and converting any
geometry which implements IGeometry into bytes. The problem is I am not
really clear on what geometry is expected here. The spatial context of a map
within MapGuide is defined as and Envelope. Unfortunately an IEnvelope does
not implement IGeometry and so cannot be converted into bytes to use in a
spatial context extent. What type(s) of geometry is expected to be stored in
an extent? I have been reading some rather technical documents about what
Spatial Contexts are from the internet but that information has been too
abstract to really know what kind of valid geometry needs to go into the
extent. I have searched around on the documentation on the FDO site also and
have not found enough information about this. Perhaps experienced
cartographers would know a lot more about spatial contexts but I come from a
more generic development background and am learning what I can about them.
View this message in context: http://www.nabble.com/Understanding-Spatial-Contexts-tp18694483p18694483.html
Sent from the FDO Users mailing list archive at Nabble.com.
fdo-users mailing list
fdo-users at lists.osgeo.org
More information about the fdo-users