当前位置: 首页>>代码示例>>Java>>正文


Java GeoEventCreator类代码示例

本文整理汇总了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;
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:20,代码来源:Line2PtProcessor.java

示例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 );
  }
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:22,代码来源:Message.java

示例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;
}
 
开发者ID:Esri,项目名称:service-area-calculator-for-geoevent,代码行数:9,代码来源:ServiceAreaCalculator.java

示例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;
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:12,代码来源:ServiceAreaCalculator.java

示例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;
}
 
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:42,代码来源:MGRSProcessor.java

示例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;
}
 
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:7,代码来源:MultiFeatureJsonOutboundAdapter.java

示例7: setGeoEventCreator

import com.esri.ges.messaging.GeoEventCreator; //导入依赖的package包/类
public void setGeoEventCreator(GeoEventCreator geoEventCreator)
{
	this.geoEventCreator = geoEventCreator;
}
 
开发者ID:Esri,项目名称:solutions-geoevent-java,代码行数:5,代码来源:CacheAwareFieldCalculator.java


注:本文中的com.esri.ges.messaging.GeoEventCreator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。