Martin:

I took a look at the GeometryTransformer this morning. Before working on a
unit test, I had a couple of questions:

1) Most of the methods defined in the class are protected, not public. That
makes it harder to test, unless we keep the unit test in the same package.
Where does JTS keep its unit tests? In the same package as the source of in
a separate package? (I did not see any tests in the source package, but I
might have missed them.)

2) Should we be testing the default implementation of GeometryTransformer?
If so, should the default implementation copy or clone the coordinates of
the geometry being transformed? I was a little confused by this statement
in the Javadoc: "The default behaviour of this class is simply to
recursively transform each Geometry component into an identical object by
deep copying down to the level of, but not including, coordinates."

3) Are you using JUnit 3 or JUnuit 4 for JTS?

Landon


On Fri, Jul 5, 2013 at 8:29 AM, Martin Davis <[email protected]> wrote:

> Thanks, Felix.  Now fiixed.
>
> And obviously GeometryTransformer needs some unit tests!  Anyone care to
> tackle this?
>
>
> On Fri, Jul 5, 2013 at 7:03 AM, Felix Obermaier <[email protected]> wrote:
>
>> Hello Martin,
>>
>> There is a small glitch in the TopologyPreservingSimplifierTest. The
>> testMultiPolygonWithEmpty function does not use the TPSimplifierResult:
>>
>> public void testMultiPolygonWithEmpty() throws Exception {
>> new GeometryOperationValidator(
>> DPSimplifierResult.getResult(
>> "MULTIPOLYGON (EMPTY, ((-36 91.5, 4.5 91.5, 4.5 57.5, -36 57.5, -36
>> 91.5)), ((25.5 57.5, 61.5 57.5, 61.5 23.5, 25.5 23.5, 25.5 57.5)))",
>> 10.0))
>> .test();
>> }
>>
>> If it would, the test would fail. This is due to the fact that the
>> transformLinearRing function of  the GeometryTransformer class does not
>> take into account that the transformCoordinates function now returns null
>> if the passed sequence has no elements.
>>
>> Hth
>> Felix Obermaier
>>
>> ------------------------------------------
>> Ingenieurgruppe IVV GmbH & Co. KG
>> Dipl.-Ing. Felix Obermaier
>> Oppenhoffallee 171
>> 52066 Aachen
>>
>> Telefon: +49 (241) 94691-39
>> Telefax: +49 (241) 531622
>> eMail: [email protected]
>> Internet: http://www.ivv-aachen.de
>>
>> Sitz der Gesellschaft: Aachen
>> Amtsgericht Aachen HRA 6212
>> GF: Bauassessor Dr.-Ing. Dieter Hölsken
>> IVV-Management GmbH
>> Amtsgericht Aachen HRB 12453
>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Jts-topo-suite-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Jts-topo-suite-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to