[fdo-users] Re: ArcSde provider unsupported geometry type
Dan Stoica
dan.stoica at autodesk.com
Sun Feb 7 20:54:55 EST 2010
Yes, FDO has such utility, see FdoSpatialGeometryConverter.h.
The application has to create a concrete class, an easy task, see for example:
// Implementation class for abstract FdoSpatialGeometryConverter class.
// No X and Y ordinates swapping.
class FdoRdbmsSqlServerSpatialGeometryConverter : public FdoSpatialGeometryConverter
{
public:
FDO_SPATIAL_API void ConvertPosition(
double &x,
double &y) {}
FDO_SPATIAL_API virtual void ConvertPosition(
double &x,
double &y,
double &z) {}
};
Then the usage goes:
FdoSpatialGeometryConverter *gc = new FdoRdbmsSqlServerSpatialGeographyConverter();
FdoPtr<FdoIGeometry> geom2D = gc->ConvertOrdinates( geometryToConvert, true, FdoDimensionality_XY, 0.0, 0.0);
delete gc;
dan.
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: Sunday, February 07, 2010 7:17 PM
To: FDO Users Mail List
Subject: Re: [fdo-users] Re: ArcSde provider unsupported geometry type
Looks like the content of the geometry is only XY anyway; is there anyway to strip the ZM on the way in? If not, some CAST-style operators would be useful...
Jason
On 7 February 2010 14:19, Dan Stoica <dan.stoica at autodesk.com<mailto:dan.stoica at autodesk.com>> wrote:
It's even a little bit more restrictive, WKB is 2D only:
FdoByteArray * FdoFgfGeometryFactory::GetWkb(FdoIGeometry * geometry)
{
if (dimensionality != FdoDimensionality_XY)
throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_10_UNSUPPORTEDGEOMETRYTYPE)));
Giorgos, what do you need the WKB for?
Dan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20100207/b3edafe9/attachment-0001.html
More information about the fdo-users
mailing list