| | |
| | | return null; |
| | | } |
| | | |
| | | Integer srid = null; |
| | | String geomType = null; |
| | | SpatialReference sr = new SpatialReference(); |
| | | if (baseMapper instanceof GeomBaseMapper) { |
| | | GeomBaseMapper geomMapper = (GeomBaseMapper) baseMapper; |
| | | geomType = geomMapper.selectGeometryType(tab); |
| | | |
| | | Integer srid = geomMapper.selectSrid(tab); |
| | | sr.ImportFromEPSG(null == srid ? 4490 : srid); |
| | | srid = geomMapper.selectSrid(tab); |
| | | } |
| | | |
| | | SpatialReference sr = new SpatialReference(); |
| | | sr.ImportFromEPSG(null == srid ? 4490 : srid); |
| | | |
| | | return dataSource.CreateLayer(tab, sr, getGeomType(geomType), null); |
| | | } |
| | |
| | | */ |
| | | private static Integer getGeomType(String geomType) { |
| | | if (StringHelper.isEmpty(geomType)) { |
| | | return ogr.wkbUnknown; |
| | | return ogr.wkbPoint; |
| | | } |
| | | |
| | | switch (geomType) { |
| | |
| | | |
| | | if (t instanceof BaseGeoEntity) { |
| | | BaseGeoEntity geoEntity = (BaseGeoEntity) t; |
| | | Geometry geom = Geometry.CreateFromWkt(geoEntity.getGeom()); |
| | | f.SetGeometry(geom); |
| | | if (!StringHelper.isEmpty(geoEntity.getGeom())) { |
| | | Geometry geom = Geometry.CreateFromWkt(geoEntity.getGeom()); |
| | | f.SetGeometry(geom); |
| | | } |
| | | } |
| | | |
| | | setFeatureData(f, fields, t); |