Matthias Basler wrote:
Hi developers, hi Martin.

Related to my first mail:

Keeping a list (in a file) of invalid referencing objects would work, but there
is one more thing that implies the need to instantiate every single CRS object:
It is the need to optionally restrict my search to 2D or 3D CRS.

An EPSG database query could easily restrict the result set to 2D or 3D objects,
since f.e. the "COORD_REF_SYS_KIND" column distinguishes between "projected2D",
"geographic3D" a.s.o.
The problem is that the AuthorityFactory:getAuthorityCodes() function does not
support any kind of additional hints, like "2D" or "3D" or maybe spatial
restrictions (sth. like "... where 'area' contains 'Germany'"). In the end this
means that I have to instantiate the referencing objects in order to sort out
those I don't need ... which is plainly inefficient, given that the info is
already in the database.

Question 1:
  Is there already ANY means of telling an authority factory to return 2D
  or 3D CRS and CS only? I couldn't find anything related in the code,
  but maybe I've overlooked something.
On geotools 2.3 you could allow for this with a Filter. Accepting the filter and turning it into an hsql query on one side, and using a JXPath implementation to query the CRS data structures (as java beans) on the other..
Question 2:
  If not, would you think that it would be possible to add hints to
  either this specific "getAuthorityCodes()" method or alternatively to
  FactoryFinder.getCRSAuthorityFactory("EPSG", hints); //$NON-NLS-1$
  (The latter one would not require interface changes. It would then
  return a factory that produced only 2D or only 3D objects. Why not...)
Both those options could work, the second would be less work.
Jody



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to