Sounds reasonable. I guess the potential pitfall is any code that is
relying on an unsafe conversion. In this case do you need the conversion to
return null (ie fail to convert) or do you need it engage with the correct
(safe conversion)? If the latter perhaps a two pass approach might work in
which first a safe conversion is tried and then a second unsafe is tried
only if the safe path failed. I have seen this approach used in other
places.
$0.02
On Wed, Aug 8, 2012 at 3:05 AM, Andrea Aime <[email protected]>wrote:
> Hi,
> looking at one strange behavior of a JTS based process today I realized the
> GeometryTypeConverterFactory is doing some unsafe conversions by default:
> turning any geometry to its centroid, building linestrings out of any
> geoemtry set of
> points, and building a polygon the same way (which will often lead to an
> invalid polygon).
>
> On the other side we have safe conversions above those, the ones that
> switch from
> simple to multi-geometries (and it would also be safe to switch from multi
> to simple
> in case the multi has only one geometry).
>
> I believe we should force the process wrappers to use safe conversions
> only, and
> have the above "acrobatic" conversions be considered unsafe (actually the
> extraction
> of the polygon from a set of point makes no sense at all to me).
>
> Opinions?
>
> Cheers
> Andrea
>
> --
> ==
> Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
> information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 962313
> mob: +39 339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> GeoTools-Devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel