| | |
| | | |
| | | public final static List<String> EPSGS = new ArrayList<>(Arrays.asList("EPSG:4326", "EPSG:4490", "ESRI:104903")); |
| | | |
| | | public final static List<Integer> DEFAULT_EPSG = new ArrayList<>(Arrays.asList(0, 104903, 900914)); |
| | | |
| | | /** |
| | | * 16进制 |
| | | */ |
| | |
| | | public class MarkJsonEntity implements Serializable { |
| | | private static final long serialVersionUID = 7776629022021914001L; |
| | | |
| | | private Integer id; |
| | | private Long id; |
| | | |
| | | private String name; |
| | | |
| | |
| | | public MarkJsonEntity() { |
| | | } |
| | | |
| | | public MarkJsonEntity(Integer id) { |
| | | public MarkJsonEntity(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | |
| | | |
| | | private String info; |
| | | |
| | | private String unit; |
| | | |
| | | private List<Point> points; |
| | | |
| | | public String getToken() { |
| | |
| | | this.info = info; |
| | | } |
| | | |
| | | public String getUnit() { |
| | | return unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public List<Point> getPoints() { |
| | | return points; |
| | | } |
| | |
| | | |
| | | private String proxy; |
| | | |
| | | private String unit; |
| | | |
| | | public PublishEntity() { |
| | | } |
| | | |
| | |
| | | public void setProxy(String proxy) { |
| | | this.proxy = proxy; |
| | | } |
| | | |
| | | public String getUnit() { |
| | | return unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | } |
| | |
| | | |
| | | private Integer pubid; |
| | | |
| | | private String unit; |
| | | |
| | | public LayerEntity() { |
| | | } |
| | | |
| | |
| | | public void setPubid(Integer pubid) { |
| | | this.pubid = pubid; |
| | | } |
| | | |
| | | public String getUnit() { |
| | | return unit; |
| | | } |
| | | |
| | | public void setUnit(String unit) { |
| | | this.unit = unit; |
| | | } |
| | | } |
| | |
| | | |
| | | // SpatialReference sr = new SpatialReference(); sr.ImportFromEPSG(null == srid || 0 == srid ? StaticData.I104903 : srid) |
| | | SpatialReference sr; |
| | | if (null == srid || 0 == srid) { |
| | | if (null == srid || StaticData.DEFAULT_EPSG.contains(srid)) { |
| | | sr = new SpatialReference(StaticData.MOON_2000_WKT); |
| | | } else { |
| | | sr = new SpatialReference(); |
| | |
| | | for (int i = 0; i < layer.GetFeatureCount(); i++) { |
| | | Feature f = layer.GetFeature(i); |
| | | |
| | | MarkJsonEntity me = new MarkJsonEntity(i + 1); |
| | | MarkJsonEntity me = new MarkJsonEntity(i + 1L); |
| | | for (Integer key : fieldMap.keySet()) { |
| | | Field field = fieldMap.get(key); |
| | | GdbHelper.setValue(me, f, field, key); |
| | |
| | | try { |
| | | AnalysisResultEntity entity = new AnalysisResultEntity(token); |
| | | entity.setLayerName(pub.getName()); |
| | | entity.setUnit(pub.getUnit()); |
| | | |
| | | List<MetaEntity> metas = publishService.selectMetasByPubid(pub.getId()); |
| | | if (null == metas || metas.isEmpty()) { |
| | |
| | | try { |
| | | AnalysisResultEntity entity = new AnalysisResultEntity(); |
| | | entity.setLayerName(pub.getName()); |
| | | entity.setUnit(pub.getUnit()); |
| | | |
| | | List<MetaEntity> metas = publishService.selectMetasByPubid(pub.getId()); |
| | | if (null == metas || metas.isEmpty()) { |
| | |
| | | url: jdbc:postgresql://192.168.20.83:5433/moon?useAffectedRows=true |
| | | #url: jdbc:postgresql://103.85.165.99:25432/moon?useAffectedRows=true |
| | | username: postgres |
| | | password: Postgres!_14_moon |
| | | #password: postgres |
| | | password: Postgres!_14_moon |
| | | driver-class-name: org.postgresql.Driver |
| | | platform: POSTGRESQL |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | |
| | | </select> |
| | | |
| | | <select id="selectRaster" resultType="com.moon.server.entity.data.PublishEntity"> |
| | | select c.cn_name "name", a.* |
| | | select c.cn_name "name", c.unit, a.* |
| | | from lf.sys_publish a inner join lf.sys_res b on a.id = b.pubid |
| | | inner join lf.sys_layer c on b.id = c.resid |
| | | where a.type in ('DOM', 'DEM') and a.status = 3 and c.status = 1; |
| | |
| | | |
| | | <insert id="insert" parameterType="com.moon.server.entity.sys.LayerEntity"> |
| | | insert into lf.sys_layer |
| | | (pid,cn_name,en_name,url,is_layer,is_show,icon,level,order_num,status,create_user,create_time,bak,elev,resid,type,data,tab,category,flag) |
| | | (pid,cn_name,en_name,url,is_layer,is_show,icon,level,order_num,status,create_user,create_time,bak,elev,resid,type,data,tab,category,flag,unit) |
| | | values |
| | | (#{pid},#{cnName},#{enName},#{url},#{isLayer},#{isShow},#{icon},#{level},#{orderNum},#{status},#{createUser},now(),#{bak},#{elev},#{resid},#{type},#{data},#{tab},#{category},#{flag}) |
| | | (#{pid},#{cnName},#{enName},#{url},#{isLayer},#{isShow},#{icon},#{level},#{orderNum},#{status},#{createUser},now(),#{bak},#{elev},#{resid},#{type},#{data},#{tab},#{category},#{flag},#{unit}) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_layer |
| | | (pid,cn_name,en_name,url,is_layer,is_show,icon,level,order_num,status,create_user,create_time,bak,elev,resid,type,data,tab,category,flag) |
| | | (pid,cn_name,en_name,url,is_layer,is_show,icon,level,order_num,status,create_user,create_time,bak,elev,resid,type,data,tab,category,flag,unit) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.pid},#{item.cnName},#{item.enName},#{item.url},#{item.isLayer},#{item.isShow},#{item.icon},#{item.level},#{item.orderNum},#{item.status},#{item.createUser},now(),#{item.bak},#{item.elev},#{item.resid},#{item.type},#{item.data},#{item.tab},#{item.category},#{item.flag}) |
| | | (#{item.pid},#{item.cnName},#{item.enName},#{item.url},#{item.isLayer},#{item.isShow},#{item.icon},#{item.level},#{item.orderNum},#{item.status},#{item.createUser},now(),#{item.bak},#{item.elev},#{item.resid},#{item.type},#{item.data},#{item.tab},#{item.category},#{item.flag},#{item.unit}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | |
| | | <update id="update"> |
| | | update lf.sys_layer |
| | | set pid=#{pid},cn_name=#{cnName},en_name=#{enName},url=#{url},is_layer=#{isLayer},is_show=#{isShow},icon=#{icon},level=#{level},order_num=#{orderNum},status=#{status},update_user=#{updateUser},update_time=now(),bak=#{bak},elev=#{elev},resid=#{resid},type=#{type},data=#{data},tab=#{tab},category=#{category},flag=#{flag} |
| | | set pid=#{pid},cn_name=#{cnName},en_name=#{enName},url=#{url},is_layer=#{isLayer},is_show=#{isShow},icon=#{icon},level=#{level},order_num=#{orderNum},status=#{status},update_user=#{updateUser},update_time=now(),bak=#{bak},elev=#{elev},resid=#{resid},type=#{type},data=#{data},tab=#{tab},category=#{category},flag=#{flag},unit=#{unit} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updates"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_layer |
| | | set pid=#{item.pid},cn_name=#{item.cnName},en_name=#{item.enName},url=#{item.url},is_layer=#{item.isLayer},is_show=#{item.isShow},icon=#{item.icon},level=#{item.level},order_num=#{item.orderNum},status=#{item.status},update_user=#{item.updateUser},update_time=now(),bak=#{item.bak},elev=#{item.elev},resid=#{item.resid},type=#{item.type},data=#{item.data},tab=#{item.tab},category=#{item.category},flag=#{item.flag} |
| | | set pid=#{item.pid},cn_name=#{item.cnName},en_name=#{item.enName},url=#{item.url},is_layer=#{item.isLayer},is_show=#{item.isShow},icon=#{item.icon},level=#{item.level},order_num=#{item.orderNum},status=#{item.status},update_user=#{item.updateUser},update_time=now(),bak=#{item.bak},elev=#{item.elev},resid=#{item.resid},type=#{item.type},data=#{item.data},tab=#{item.tab},category=#{item.category},flag=#{item.flag},unit=#{item.unit} |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |