Well after forking some of Martins code (from referencing) Justin walked
me through the needed maven magic ....
Rather then explain here is the snip:
> <dependency>
> <groupId>org.geotools</groupId>
> <artifactId>gt2-referencing</artifactId>
> <version>${project.version}</version>
> <scope>test</scope>
> <exclusions>
> <exclusion>
> <groupId>org.opengis</groupId>
> <artifactId>geoapi-nogenerics</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
We wanted to depend on referencing but not drag in the conflicting
geoapi-nogenerics jar.
Sweet,
Jody
> One thing I was wondering as I hunted down the FeatGeomFactoryImpl in
> search of a CoordinateReferenceSystem is *why* DimensionModel would ever
> of been made.
>
> Well now I have an answer.
>
> Those working on this library *never* had a real
> CoordinateReferenceSystem object to work with. I know because I just
> tried and I am in a maven dependency conflict.
>
> unsupported/geometry/pom.xml include the following:
>
>> <dependency>
>> <groupId>org.opengis</groupId>
>> <artifactId>geoapi</artifactId>
>> <version>2.1-SNAPSHOT</version>
>> </dependency>
>> <dependency>
>> <groupId>javax.units</groupId>
>> <artifactId>jsr108</artifactId>
>> <version>0.01</version>
>> </dependency>
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <version>3.8.1</version>
>> <scope>test</scope>
>> </dependency>
>>
> So far all pretty normal - trick is the following:
> - That is a dependency on geoapi (the real Java 5 interfaces not our
> usual geoapi-nogenerics stuff
>
> Attempting to test the code with a real CoordinateReferenceSystem
> involves the use of:
>
>> <dependency>
>> <groupId>org.geotools</groupId>
>> <artifactId>gt2-referencing</artifactId>
>> <version>${project.version}</version>
>> <scope>test</scope>
>> </dependency>
>>
> This results in a conflict:
> 1. geoapi-nogenerics is brought into the picture because gt2-referencing
> needs it
> 2. geoapi was already brought into the picture because we need to
> implement it
>
> So no can go ... I have looked at this every which way and cannot figure
> out a way for maven to let us do what we need. I am going to have to
> stub a MockCoordinateReferenceSystem in order to get this thing tested.
>
> Cheers,
> Jody
> PS. Sanjay did you ask for help on this stuff last fall?
>
>> I am working on that now (the official build is Java 1.4 based) - I can
>> commit code that compiles (but I have test failures).
>>
>> For interest I found that the unsupported/geometry implementation is
>> built around some flaws ....
>>
>> FeatGeomFactoryImpl - is a "container" that holds the following
>> - CoordianteReferenceSystem
>> - PrecisionModel - *new for geoapi* (implementation already existed)
>> - CoordinateFactoryImpl
>> - PrimitiveFactoryImpl
>> - PositionFactoryImpl - *new for geoapi* isolate position creation code
>> in one spot
>> - ComplexFactoryImpl
>> - CollectionFactory - own invention to isolate create list code
>> - dimensionModel - 2, 2.5, or 3 dimension (used as a strategy object by
>> some calculations)
>>
>> It also looks like three singletons are available and used:
>> - singleton2D,singleton205D, singleton3D
>>
>> I have two problems with this:
>> - dimension model should not be an alternative to checking the
>> coordinate reference system (should it?)
>> - all instances contain back pointers to FeatGeomFactoryImpl - and often
>> perform casts to get there (not safe)
>> - singletons do not mix with the idea of changing your coordinate
>> reference system
>>
>> So right now this implementation appears to not support coordinate
>> reference systems (I hope I am reading the code wrong...debugger is
>> warmed up now).
>>
>> Cheers,
>> Jody
>>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel