georust / geozero

Zero-Copy reading and writing of geospatial data.
Apache License 2.0
321 stars 30 forks source link

Impl `GeozeroGeometry` for concrate type should impls srid() and dims() #195

Open ariesdevil opened 4 months ago

ariesdevil commented 4 months ago

Currently only geos::Geometry<'_> impl all funcs in GeozeroGeometry, other types like Ewkb will use the default impl in trait definition.

The default impls are as follows so we cannot get dims and srid for types like Ewkb:

    fn dims(&self) -> CoordDimensions {
        CoordDimensions::xy()
    }
    /// SRID of geometry
    fn srid(&self) -> Option<i32> {
        None
    }
ariesdevil commented 4 months ago

And I need parse srid manually when do transform: https://github.com/datafuselabs/databend/pull/14615/files#diff-9be506d723a6d34b70933330d0e09aac81d43cb005f941978b94acad13cdb622R154