本文整理汇总了Java中com.esri.ges.messaging.GeoEventCreator类的典型用法代码示例。如果您正苦于以下问题:Java GeoEventCreator类的具体用法?Java GeoEventCreator怎么用?Java GeoEventCreator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GeoEventCreator类属于com.esri.ges.messaging包,在下文中一共展示了GeoEventCreator类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createLine2PtGeoevent
import com.esri.ges.messaging.GeoEventCreator; //导入依赖的package包/类
private GeoEvent createLine2PtGeoevent(GeoEvent event, MapGeometry outGeo, Date ts) throws MessagingException, FieldException
{
GeoEventCreator creator = messaging.createGeoEventCreator();
GeoEvent msg = creator.create(outDef, definition.getUri().toString());
for(FieldDefinition fd: event.getGeoEventDefinition().getFieldDefinitions())
{
if(fd.getTags().contains("GEOMETRY"))
{
msg.setGeometry(outGeo);
}
else
{
msg.setField(fd.getName(), event.getField(fd.getName()));
}
msg.setField("TIMESTAMP", ts);
}
return msg;
}
示例2: convertToGeoEvent
import com.esri.ges.messaging.GeoEventCreator; //导入依赖的package包/类
public GeoEvent convertToGeoEvent(GeoEventCreator geoEventCreator, String gedName, String gedOwner)
{
try
{
GeoEvent geoEvent = geoEventCreator.create( gedName, gedOwner );
geoEvent.setField( MESSAGE_ID_KEY, id );
geoEvent.setField( TYPE_KEY, type );
geoEvent.setField( SUBJECT_KEY, subject );
geoEvent.setField( MESSAGE_TIME_KEY, messageTime );
geoEvent.setField( MESSAGE_FROM_KEY, messageFrom );
geoEvent.setField( MESSAGE_TO_KEY, messageTo );
geoEvent.setField( STATUS_KEY, status );
geoEvent.setField( MESSAGE_BODY_KEY, messageBody );
geoEvent.setField( CALLBACK_KEY, callback );
return geoEvent;
}
catch( Exception e )
{
throw new RuntimeException( e );
}
}
示例3: ServiceAreaCalculator
import com.esri.ges.messaging.GeoEventCreator; //导入依赖的package包/类
protected ServiceAreaCalculator(GeoEventProcessorDefinition definition, GeoEventHttpClientService httpService, GeoEventCreator geoEventCreator, GeoEventDefinitionManager geoEventDefinitionManager, ArcGISServerConnectionManager agsConnectionManager) throws ComponentException
{
super(definition);
this.httpService = httpService;
this.geoEventCreator = geoEventCreator;
this.geoEventDefinitionManager = geoEventDefinitionManager;
this.agsConnectionManager = agsConnectionManager;
}
示例4: ServiceAreaCalculator
import com.esri.ges.messaging.GeoEventCreator; //导入依赖的package包/类
protected ServiceAreaCalculator(GeoEventProcessorDefinition definition, StopsManager stopsManager, ArcGISServerConnectionManager agsConnectionManager, AoiManager aoiManager, GeoEventCreator geoEventCreator, Spatial spatial, String geofenceGEDName, String geofenceGEDOwner) throws ComponentException
{
super(definition);
this.stopsManager = stopsManager;
this.agsConnectionManager = agsConnectionManager;
this.aoiManager = aoiManager;
this.geoEventCreator = geoEventCreator;
this.spatial = spatial;
this.geofenceGEDName = geofenceGEDName;
this.geofenceGEDOwner = geofenceGEDOwner;
}
示例5: process
import com.esri.ges.messaging.GeoEventCreator; //导入依赖的package包/类
@Override
public GeoEvent process(GeoEvent evt) throws Exception {
MapGeometry mapGeo = (MapGeometry) evt.getField(geofld);
Geometry geo = mapGeo.getGeometry();
int wkid = mapGeo.getSpatialReference().getID();
if(wkid != 4326)
{
return null;
}
if(geo.getType() != Geometry.Type.Point)
{
return null;
}
Point pt = (Point)geo;
double[] coords = {pt.getX(), pt.getY()};
PeGeogcs pegeocs = PeFactory.geogcs(4326);
String[] mgrsvals = new String[1];
PeNotationMgrs.geog_to_mgrs(pegeocs, 1, coords, accuracy, false, mgrsvals);
String mgrs = mgrsvals[0];
//LL ll = new LL(pt.getX(), pt.getY());
//ll.setAccuracy(accuracy);
//MGRS2LatLongConverter converter = new MGRS2LatLongConverter();
//String mgrs = converter.LL2MRGS(ll);
GeoEventDefinition edOut;
GeoEventDefinition geoDef = evt.getGeoEventDefinition();
if((edOut=manager.searchGeoEventDefinition(newdef, getId()))==null)
{
edOut = geoDef.augment(fds);
edOut.setOwner(getId());
edOut.setName(newdef);
manager.addGeoEventDefinition(edOut);
}
GeoEventCreator geoEventCreator = messaging.createGeoEventCreator();
GeoEvent geOut = geoEventCreator.create(edOut.getGuid(), new Object[] {
evt.getAllFields(), mgrs });
geOut.setProperty(GeoEventPropertyName.TYPE, "message");
geOut.setProperty(GeoEventPropertyName.OWNER_ID, getId());
geOut.setProperty(GeoEventPropertyName.OWNER_ID, definition.getUri());
return geOut;
}
示例6: MultiFeatureJsonOutboundAdapter
import com.esri.ges.messaging.GeoEventCreator; //导入依赖的package包/类
public MultiFeatureJsonOutboundAdapter(AdapterDefinition definition, OutboundAdapter featureAdapter, GeoEventCreator geoEventCreator)
{
this.definition = definition;
this.featureAdapter = featureAdapter;
this.geoEventCreator = geoEventCreator;
}
示例7: setGeoEventCreator
import com.esri.ges.messaging.GeoEventCreator; //导入依赖的package包/类
public void setGeoEventCreator(GeoEventCreator geoEventCreator)
{
this.geoEventCreator = geoEventCreator;
}