[fdo-users] view scale

Artyom artem.dolya at ambercore.com.ua
Wed Feb 20 11:46:34 EST 2008


Can you give some concrete instructions please.

Artem

Gavin Cramer wrote:
> 
> Normally, one would use the SpatialExtents computed property from a
> SelectAggregates command.  This property, along with Count(), is supported
> by many providers, often with an optimized implementation where possible.
> 
> Since you are implementing a provider yourself, that would be the place to
> implement any means that you can find to get the actual extents of stored
> features.  This is as opposed to the extents of a Spatial Context, which
> are typically set as the largest reasonable extent possible for the
> context.
> 
> When an optimized means is not available, the usual last resort is a
> retrieval of all features in the layer.  If you can efficiently get them
> into FGF format, FdoSpatialUtility::GetExtents is the fastest means to
> compute the extent of each feature.
> 
> Gavin
> 
> 
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Artyom
> Sent: Tuesday, February 19, 2008 11:47 AM
> To: fdo-users at lists.osgeo.org
> Subject: RE: [fdo-users] view scale
> 
> 
> My provider must be for both types.
> 
> If it is possible to give me an information about how to get it for
> features?
> 
> Thank you
> 
> 
> Traian Stanev wrote:
>>
>>
>> You cannot get the screen extent from inside an FDO provider, unless your
>> data is raster. Is your data raster?
>>
>>
>> If your data is vectors, you could add a custom function that can be used
>> with a Select command to pass such arguments (like raster providers do),
>> however, you would need to ensure that FDO clients like Map and MapGuide
>> in turn use this custom function when requesting data from your provider.
>>
>>
>> Traian
>>
>>
>>
>>> -----Original Message-----
>>> From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-
>>> bounces at lists.osgeo.org] On Behalf Of Artyom
>>> Sent: Monday, February 18, 2008 11:40 AM
>>> To: fdo-users at lists.osgeo.org
>>> Subject: RE: [fdo-users] view scale
>>>
>>>
>>> Hi again
>>>
>>> It seems that I gave not enough information about what I need.
>>>
>>> As mentioned Orest I need the scale such as e.g. 1:20,000. To compute
>>> it I
>>> need a full extent of my data, and a current extent of the view. There
>>> is a
>>> method FdoSpatialUtility::GetExtents wich fills an extend using a
>>> FdoSpatialCondition. But it is an incorrect method as I understand it
>>> does
>>> not return an extend of the current "View". To use formula given by
>>> Orest
>>>
>>> Scale = sqrt((dbmaxy-dbminy)**2 + (dbmaxx-dbminx)**2) /
>>> sqrt((scrmaxy-scrminy)**2 + (scrmaxx-scrminx)**2)
>>>
>>> I need a screen extent. How can I get it.
>>>
>>> Thanks
>>>
>>>
>>> Orest Halustchak wrote:
>>> >
>>> > Hi Artyom,
>>> >
>>> > Just to clarify, what scale do you need to find? By "view scale" do
>>> you
>>> > mean the scale between a map display and ground coordinates (e.g.
>>> > 1:20,000)? If that's really what you mean, then FDO itself has
>>> nothing to
>>> > do with that scale. FDO is independent of any map display. Scale
>>> would
>>> > have to be computed outside of FDO.
>>> >
>>> > Thanks,
>>> > Orest.
>>> >
>>> > -----Original Message-----
>>> > From: fdo-users-bounces at lists.osgeo.org
>>> > [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Artyom
>>> > Sent: Friday, February 15, 2008 9:36 AM
>>> > To: fdo-users at lists.osgeo.org
>>> > Subject: RE: [fdo-users] view scale
>>> >
>>> >
>>> > Our data type does not have a measure information. We have type of
>>> objects
>>> > that contains some attributive information but mostly it xyz. And to
>>> read
>>> > our data not enough to know only current extent.
>>> > About the coordination system can't say anything concrete for now.
>>> Because
>>> > I
>>> > need to convert our coordininate system to WKT. now I use only
>>> default
>>> > system. I'll research this question a bit later. And by the way my
>>> > provider
>>> > is unmanaged. I couldn't find the entry point for managet connection
>>> wich
>>> > could be equivalent to the unmanaged FdoIConnection* CreateConnection
>>> ().
>>> > So
>>> > if there is any way to find the scale not using the measure value? Or
>>> it
>>> > can
>>> > be done by FDO spatial utilities?
>>> >
>>> > Thank you for you replies!
>>> >
>>> >
>>> >
>>> > Orest Halustchak wrote:
>>> >>
>>> >> Hi,
>>> >>
>>> >> Artyom, FDO itself deals with data access and has nothing to do with
>>> view
>>> >> scales or other view / rendering attributes. That's up to client
>>> >> applications such as MapGuide. The data itself is stored in units
>>> defined
>>> >> by the CRS as Maksim points out. Even M (measure) values that might
>>> be
>>> >> stored are not tied to any view or view scale. They often are based
>>> on
>>> >> ground distance, but can be other units as an application may
>>> define.
>>> >>
>>> >> Thanks,
>>> >> Orest.
>>> >>
>>> >> -----Original Message-----
>>> >> From: fdo-users-bounces at lists.osgeo.org
>>> >> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Maksim
>>> Sestic
>>> >> Sent: Friday, February 15, 2008 5:24 AM
>>> >> To: fdo-users at lists.osgeo.org
>>> >> Subject: RE: [fdo-users] view scale
>>> >>
>>> >>
>>> >> OSgeo::FDO::Geometry::DirectPositionImpl has M() property - it
>>> represents
>>> >> a
>>> >> Measure related to given coordinate. It's on you to implement
>>> parsing of
>>> >> the
>>> >> measure information and extracting something meaningful out of it.
>>> >> Geometry,
>>> >> as it is, doesn't posses a scale - it's unitless by default.
>>> >>
>>> >> On the other hand, FeatureStore may have CRS (Coordinate Reference
>>> >> System)
>>> >> set. CRS establishes soft spatial relation between the "space"
>>> >> (container)
>>> >> and geometric entities placed in it. It's definition does posses
>>> measure
>>> >> info, just look under UNITS part of CRS WKT string.
>>> >>
>>> >> Regards,
>>> >> Maksim Sestic
>>> >>
>>> >>
>>> >>
>>> >> Artyom wrote:
>>> >>>
>>> >>> I'm developing an Fdo provider. And I need scale, no metter if it
>>> is
>>> >>> MapGuide or AutoDesk Map 3D. Is it possible to get the scale by
>>> FDO? Or
>>> >>> my
>>> >>> problem has no solution?
>>> >>>
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >> http://www.nabble.com/view-scale-tp15432859s18162p15497822.html
>>> >> Sent from the fdo-users mailing list archive at Nabble.com.
>>> >>
>>> >> _______________________________________________
>>> >> fdo-users mailing list
>>> >> fdo-users at lists.osgeo.org
>>> >> http://lists.osgeo.org/mailman/listinfo/fdo-users
>>> >> _______________________________________________
>>> >> fdo-users mailing list
>>> >> fdo-users at lists.osgeo.org
>>> >> http://lists.osgeo.org/mailman/listinfo/fdo-users
>>> >>
>>> >>
>>> >
>>> > --
>>> > View this message in context:
>>> > http://www.nabble.com/view-scale-tp15432859s18162p15502118.html
>>> > Sent from the fdo-users mailing list archive at Nabble.com.
>>> >
>>> > _______________________________________________
>>> > fdo-users mailing list
>>> > fdo-users at lists.osgeo.org
>>> > http://lists.osgeo.org/mailman/listinfo/fdo-users
>>> > _______________________________________________
>>> > fdo-users mailing list
>>> > fdo-users at lists.osgeo.org
>>> > http://lists.osgeo.org/mailman/listinfo/fdo-users
>>> >
>>> >
>>>
>>> --
>>> View this message in context: http://www.nabble.com/view-scale-
>>> tp15432859s18162p15547026.html
>>> Sent from the fdo-users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> fdo-users mailing list
>>> fdo-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/fdo-users
>> _______________________________________________
>> fdo-users mailing list
>> fdo-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fdo-users
>>
>>
> 
> --
> View this message in context:
> http://www.nabble.com/view-scale-tp15432859s18162p15560481.html
> Sent from the fdo-users mailing list archive at Nabble.com.
> 
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> 
> 

-- 
View this message in context: http://www.nabble.com/view-scale-tp15432859s18162p15591855.html
Sent from the fdo-users mailing list archive at Nabble.com.



More information about the fdo-users mailing list