| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.geotools.geojson.geom.GeometryJSON; |
| | | import org.geotools.geometry.jts.WKBReader; |
| | | import org.locationtech.jts.geom.Geometry; |
| | | import org.locationtech.jts.io.ParseException; |
| | | import org.springblade.common.utils.FileUtil; |
| | | import org.springblade.common.utils.ShapeFileUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | import org.springblade.modules.yw.vo.GeomInfoVO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 空间信息表 服务实现类 |
| | |
| | | geomInfoEntity.setGeom("'" + geometry +"'"); |
| | | // 保存 |
| | | baseMapper.saveGeoInfo(geomInfoEntity); |
| | | // 返回 |
| | | return R.data(200,geometry,"操作成功!"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // 返回 |
| | | return R.data(200,"操作成功","操作成功"); |
| | | return R.data(200,"操作失败","操作失败!读取数据错误!"); |
| | | } |
| | | |
| | | /** |
| | | * 导出 空间信息shp zip 包 |
| | | * @param ids |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<GeomInfoVO> getGeomInfoList(String ids) { |
| | | // 查询空间数据 |
| | | return baseMapper.getGeomInfoList(ids); |
| | | } |
| | | } |