POST
|
I figured out the problem while trying to reproduce it on another machine. The setField() method throws the cast error when the GeoEvent definition for the field has a cardinality of many. Changing the cardinality to one fixed the problem. I imagine that setField() would work for a cardinality of many if an array or enum object were used but I haven't tested that. I also had to update the setGeometry function: passing in just the geometry without the GUID is what is needed.
geoEvent.setGeometry(point);
... View more
09-15-2014
11:46 AM
|
0
|
0
|
325
|
POST
|
Hi, I'm working on creating a modified version of an Esri adapter for parsing XML in GeoEvent processor. I can parse values out from the XML and log them but the sample code will not set values in the GeoEvent. When the values are set either the output is null or a cast exception is returned (java.lang.ClassCastException). String and Geometry values end up being null; longs and integers cause the cast exception. I've tried using objects (i.e., Integer, Long) and primitives; both cause a cast exception. The link to the sample is below, as is the switch that should set the geoEvent values but does not. Any suggestions welcome! https://github.com/Esri/solutions-geoevent-java/tree/master/solutions-geoevent/adapters/geomessage-adapter
switch (fieldDefinition.getType())
{
case Integer:
Integer tmp = (Integer)Integer.parseInt(fieldValue);
LOG.info(tmp);
geoEvent.setField(fieldName, tmp);
LOG.info("GeoEvent value stored for " + fieldName + " :" + geoEvent.getField(fieldName));
break;
case Long:
geoEvent.setField(fieldName, Long.parseLong(fieldValue));
LOG.info("GeoEvent value stored for " + fieldName + " :" + geoEvent.getField(fieldName));
break;
case Short:
geoEvent.setField(fieldName, Short.parseShort(fieldValue));
LOG.info("GeoEvent value stored for " + fieldName + " :" + geoEvent.getField(fieldName));
break;
case Double:
geoEvent.setField(fieldName, Double.parseDouble(fieldValue));
LOG.info("GeoEvent value stored for " + fieldName + " :" + geoEvent.getField(fieldName));
break;
case Float:
geoEvent.setProperty(fieldName, Float.parseFloat(fieldValue));
LOG.info("GeoEvent value stored for " + fieldName + " :" + geoEvent.getField(fieldName));
break;
case Boolean:
//geoEvent.setField(fieldName, Boolean.parseBoolean(fieldValue));
geoEvent.setProperty(fieldName, Boolean.parseBoolean(fieldValue));
LOG.info("GeoEvent value stored for" + fieldName + " :" + geoEvent.getField(fieldName));
break;
case Date:
geoEvent.setProperty(fieldName, DateUtil.convert(fieldValue));
LOG.info("GeoEvent value stored for " + fieldName + " :" + geoEvent.getField(fieldName));
break;
case String:
geoEvent.setProperty(fieldName, fieldValue);
LOG.info("GeoEvent value stored for " + fieldName + " :" + geoEvent.getField(fieldName));
break;
case Geometry:
LOG.info("Geometry field received: "+fieldValue);
String geometryString = fieldValue;
if (geometryString.contains(";"))
geometryString = geometryString.substring(0, geometryString.indexOf(';') - 1);
String[] g = geometryString.split(",");
double x = Double.parseDouble(g[0]);
double y = Double.parseDouble(g[1]);
double z = 0;
int wkid = 4326;
Point point = spatial.createPoint(x, y, z, wkid);
// getGeometryId is deprecated
// int geometryID = geoEvent.getGeoEventDefinition().getGeometryId();
String geometryGUID = geoEvent.getGuid();
// updated to use setGeometry without using the .toJson method;
// the new method accepts a geometry object
geoEvent.setGeometry(geometryGUID, point);
Point pt = (Point) geoEvent.getGeometry();
if (pt == null){
LOG.info("Null point geometry");
}
else{
LOG.info("Geometry X value is: " + pt.getX());
}
break;
... View more
09-12-2014
10:25 AM
|
0
|
1
|
3066
|
POST
|
Thanks Nathan, I just realized you were referring to the URL of the Dashboard, not the feature services. Changing from https to http did the trick.
... View more
08-27-2014
04:13 AM
|
1
|
0
|
635
|
POST
|
It does open that way! And when I change the URL from https to http (I just realized what Nathan was suggesting) it works fine as well.
... View more
08-27-2014
04:11 AM
|
0
|
0
|
635
|
POST
|
Nathan, I configured the external data sources by adding them to a web map and then using that web map to create the OD. So there is no way (that I know of) to change the URL properties. I looked at the web map, it has the URLs with the proper prefix (http:). I may try creating a new OD and adding the external data sources directly to see if that makes a difference. I will also troubleshoot by removing one feature class at a time. Thanks, Greg
... View more
08-26-2014
06:16 AM
|
0
|
2
|
635
|
POST
|
OK, you should receive an invite shortly. Thanks for taking the time to look!
... View more
08-26-2014
06:07 AM
|
0
|
0
|
635
|
POST
|
Hi, I have an operations Dashboard (single pane) that works fine when I open it as an application. However, it never loads as a web version. After I login (with the same account that I used to author the view) the web lists the layers that it is loading but then does nothing else, staying at the loading page. There are no add-ins. It only uses feature services (from ArcGIS for Server 10.2.2) as a data source; other layers are only for display. Any suggestions? Greg
... View more
08-20-2014
11:08 AM
|
0
|
7
|
4028
|
POST
|
I happened upon the post below, which worked for me as a way to do this with a non-WMTS layer that was in a different projection: Map options: issues with non-mercator spatial reference
... View more
08-12-2014
07:31 AM
|
0
|
0
|
422
|
POST
|
Do the layers have scale dependencies so that they only draw in certain scale ranges? I just noticed that the layers missing from my legend are the ones that do not draw at smaller scales. I wonder if the legend is created when the Operations Dashboard loads and not updated when the zoom level changes.
... View more
08-12-2014
06:24 AM
|
0
|
0
|
394
|
POST
|
I'm seeing this with a dashboard that I just authored. It has two map services from ArcGIS for Server and a feature service from ArcGIS for Server. The web map legend shows both the map service items and nothing from the feature services. The Operations Dashboard legend widget only shows the first (lowest) map service layer. If I hide the legend item for the first layer, no legend items show up in the dashboard.
... View more
08-12-2014
05:30 AM
|
0
|
0
|
394
|
POST
|
Hi, With a clean install of GeoEvent Server 10.2.2 I get 21 warnings in the log file after starting it. The first looks like a conflict: Registering ManagedEndpoint failed. javax.management.InstanceAlreadyExistsException: The full stack is at the end of the message. The next 20 are all the same: org.apache.cxf.interceptor.security.SecureAnnotationsInterceptor The roles map is empty, the service object is not protected Are these safe to ignore? Is there a conflict somewhere? TIA, Greg Registering ManagedEndpoint failed. javax.management.InstanceAlreadyExistsException: org.apache.cxf:bus.id=cxf942022530,type=Bus.Service.Endpoint,service="{http://provider.service.rest.ges.esri.com/}DefaultServiceProvider",port="DefaultServiceProvider" at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)[:1.7.0_51] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(Unknown Source)[:1.7.0_51] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown Source)[:1.7.0_51] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown Source)[:1.7.0_51] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown Source)[:1.7.0_51] at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)[:1.7.0_51] at org.apache.cxf.management.jmx.InstrumentationManagerImpl.registerMBeanWithServer(InstrumentationManagerImpl.java:331) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:321) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:234) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:246) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:239) at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:107) at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:72) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:151) at com.esri.ges.rest.service.spring.JAXRSServiceBean.restartServices(JAXRSServiceBean.java:171) at com.esri.ges.rest.service.spring.JAXRSServiceBean.init(JAXRSServiceBean.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.7.0_51] at java.lang.reflect.Method.invoke(Unknown Source)[:1.7.0_51] at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:225)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:838)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:726)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:631)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:337)[22:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:230)[22:org.apache.aries.blueprint:0.3.2] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.7.0_51] at java.util.concurrent.FutureTask.run(Unknown Source)[:1.7.0_51] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)[:1.7.0_51] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)[:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.7.0_51] at java.lang.Thread.run(Unknown Source)[:1.7.0_51]
... View more
07-29-2014
11:25 AM
|
0
|
0
|
6957
|
POST
|
There's a good summary of the difference between the two types of accounts here: ArcGIS Online | Comparison Table and you may want to check out the quick start guide for public accounts: http://www.esri.com/library/brochures/pdfs/quick-start-arcgis-online.pdf
... View more
07-24-2014
09:24 AM
|
2
|
0
|
267
|
POST
|
Do you have access to an Organizational Subscription? If so, you can host your own features. See the links below for details. With a public account you can also host features but some functions and types are not supported. About hosted features and tiles—Help | ArcGIS Publish features—Help | ArcGIS
... View more
07-24-2014
09:16 AM
|
2
|
1
|
267
|
POST
|
To use the syntax that you have, declare ras1 as a raster (line 5 in your code): ras1 = sa.Raster(r"d:\ma1\Soil_Type.tif")
then your Con statement should work. Otherwise, I think that Python evaluates ras1 == class1 as a string comparison.
... View more
07-23-2014
05:03 AM
|
0
|
0
|
147
|
Title | Kudos | Posted |
---|---|---|
1 | 08-20-2013 10:37 AM | |
2 | 06-10-2014 06:29 AM | |
1 | 08-22-2013 06:31 AM | |
1 | 07-21-2014 11:09 AM | |
1 | 08-27-2014 04:13 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|