//package cn.com.taiji.track.dto; // //import cn.hutool.core.util.StrUtil; //import lombok.Data; //import org.geotools.feature.simple.SimpleFeatureBuilder; //import org.geotools.util.factory.Hints; //import org.opengis.feature.simple.SimpleFeature; // //import java.io.Serializable; //import java.util.Date; // // ///** // * @author kok20 // */ //@Data //public class BeidouShipTrackDTO extends IGeomesaTrackDTO implements Serializable { // // private static final long serialVersionUID = -8983779632713666636L; // // private String time; // private Long trackId; // private String deviceId; // private Long shipType; // private Long workType; // private Integer workWay; // private String sendTime; // private String locationTime; // private Integer online; // private Integer shipLength; // private Integer shipWidth; // private Integer texture; // private Double longitude; // private Double latitude; // private Double direction; // private Double speed; // private Integer kwh; // private String shipName; // private String location; // // @Override // public boolean checkPoint() { // if (longitude != null && latitude != null) { // location = StrUtil.format("POINT ({} {})", longitude, latitude); // return true; // } // return false; // } // // @Override // public String getTypeName() { return "beidou-data"; } // // @Override // public String getLayerType() { // return "geo_beidou_ship"; // } // // @Override // public String getWsLayerName() { // return "beidou-ship"; // } // // @Override // public String getFid() { // return deviceId; // } // // @Override // public StringBuilder getSimpleFeatureType(){ // StringBuilder attributes = new StringBuilder(); // attributes.append("time:String,"); // attributes.append("trackId:Long,"); // attributes.append("deviceId:String:index=true,"); // attributes.append("shipType:Long,"); // attributes.append("workType:Long,"); // attributes.append("workWay:Integer,"); // attributes.append("sendTime:String,"); // attributes.append("locationTime:String,"); // attributes.append("online:Integer,"); // attributes.append("shipLength:Integer,"); // attributes.append("shipWidth:Integer,"); // attributes.append("texture:Integer,"); // attributes.append("longitude:Double,"); // attributes.append("latitude:Double,"); // attributes.append("direction:Double,"); // attributes.append("speed:Double,"); // attributes.append("kwh:Integer,"); // attributes.append("shipName:String,"); // attributes.append("*location:Point:srid=4326,"); // // attributes.append("layerType:String,"); // attributes.append("syncTime:Date"); // return attributes; // } // // @Override // public SimpleFeature toSimpleFeature(SimpleFeatureBuilder builder, String fid) { // builder.set("time", time); // builder.set("trackId", trackId); // builder.set("deviceId", deviceId); // builder.set("shipType", shipType); // builder.set("workType", workType); // builder.set("workWay", workWay); // builder.set("sendTime", sendTime); // builder.set("locationTime", locationTime); // builder.set("online", online); // builder.set("shipLength", shipLength); // builder.set("shipWidth", shipWidth); // builder.set("texture", texture); // builder.set("longitude", longitude); // builder.set("latitude", latitude); // builder.set("direction", direction); // builder.set("speed", speed); // builder.set("kwh", kwh); // builder.set("shipName", shipName); // // builder.set("location", location); // // builder.set("layerType", getLayerType()); // builder.set("syncTime", new Date()); // builder.featureUserData(Hints.USE_PROVIDED_FID, Boolean.TRUE); // return builder.buildFeature(fid); // } // // @Override // public String[] getPropList(){ // return new String[] { // "time", // "trackId", //// "deviceId", // "shipType", // "workType", // "workWay", // "sendTime", // "locationTime", // "online", // "shipLength", // "shipWidth", // "texture", // "longitude", // "latitude", // "direction", // "speed", // "kwh", // "shipName", // "location", // "layerType", // "syncTime" // }; // } // // @Override // public Object[] getValueList() { // return new Object[] { // time, // trackId, //// deviceId, // shipType, // workType, // workWay, // sendTime, // locationTime, // online, // shipLength, // shipWidth, // texture, // longitude, // latitude, // direction, // speed, // kwh, // shipName, // location, // getLayerType(), // new Date() // }; // } //}