ArcGIS javascript: graphicsUtils.graphicsExtent with one point feature

This applies to javascript developers using the ArcGIS Javascript API. If you’re using the graphicsUtils to get the extent of a set of graphics, you can use graphicsUtils.graphicsExtent. But if your set of features contains a single point, the extent returned is null. Which makes sense, but it took me a little while to figure this out. So check for the number of points (and whether they actually have a different location) before trusting this graphicsExtent function to operate correctly.

It’s a small thing, but hey, it might save you some time.

See https://developers.arcgis.com/javascript/jsapi/esri.graphicsutils-amd.html.

 

Advertisements

Manipulating ArcGIS Online services through REST with Python

This week, I faced the problem of having to delete 1.7 million features in a feature service in ArcGIS Online. Normally, I would make a remote connection to the server, access the geodatabase and delete the features with a few mouseclicks. However, ArcGIS Online has no such feature. So I had to resort to the REST interface to the feature service: deleteFeatures. The API reference can be found here. Pretty straightforward, I would say.

But after waiting for a few (or rather: a lot of) seconds, I got a server timeout. It seems that 1.7 million features is rather too much to manipulate through the REST interface. I had to do this in batches. When talking about batches, Python jumps to mind. So I constructed a very small Python script, that also can be used to demonstrate the way you can manipulate ArcGIS Online feature services through the REST interface.

Continue reading

Augmented Reality with Layar and ArcGIS Online

Let’s investigate how GIS and Augmented Reality can operate together. That is what I thought when I watched the possibilities of Layar some time ago. But only until last week, I did not find the time to look into it. But it turns out to be very fascinating to do and I am sure it will open up some new possibilities to combine the managebility of GIS with the exiting visualisations of Augmented Reality.

Continue reading