类 ProtoFeatureConverter


  • public class ProtoFeatureConverter
    extends Object
    ProtoFeature bytes与Feature的相互转换
    作者:
    liuyu
    createdate
    2022/3/25
    • 构造器详细资料

      • ProtoFeatureConverter

        public ProtoFeatureConverter()
    • 方法详细资料

      • geometry2Proto

        public static byte[] geometry2Proto​(org.locationtech.jts.geom.Geometry geometry)
        geometry 转 ProtoFeature bytes
        参数:
        geometry - geometry
        返回:
        ProtoFeature bytes
      • proto2Geometry

        public static org.locationtech.jts.geom.Geometry proto2Geometry​(byte[] bytes,
                                                                        org.locationtech.jts.geom.GeometryFactory geometryFactory)
        ProtoFeature bytes 转 geometry
        参数:
        bytes - ProtoFeature bytes
        geometryFactory - jts geometryFactory
        返回:
        geometry
      • featureCollection2Proto

        public static byte[] featureCollection2Proto​(FeatureCollection featureCollection)
        FeatureCollection 转 ProtoFeature bytes
        参数:
        featureCollection - FeatureCollection
        返回:
        ProtoFeature bytes
      • proto2featureCollection

        public static FeatureCollection proto2featureCollection​(byte[] bytes,
                                                                org.locationtech.jts.geom.GeometryFactory geometryFactory)
        ProtoFeature bytes 转 FeatureCollection
        参数:
        bytes - ProtoFeature bytes
        geometryFactory - jts GeometryFactory
        返回:
        FeatureCollection