ArcGIS Length and Area Calculation Scenarios

Was compiling some different scenarios for ArcGIS length and area calculations — hope it’s helpful. Let me know if you see any errors.

GCS = Geographic coordinate system PCS = Projected coordinate system
All links are to 10.1 help docs –

Feature Class shape_length and shape_area fields
a. GCS – ?
b. PCS – Using simple planar
c. Is it always auto-updated, except for shapefiles? yes

ArcMap Measurment Tool
a. GCS – default geodesic, alternatives are Loxodrome and Great Elliptic, but not planar. Area calculation not available!
b. PCS – default planar, alternatives Geodesic, Loxodrome, and Great Elliptic

http://resources.arcgis.com/en/help/main/10.1/index.html#//00s500000022000000

Attribute Table Calculator
a. GCS – not available
b. PCS – planar

http://resources.arcgis.com/en/help/main/10.1/index.html#//005s00000027000000

Calculate Field Tool (Data Management toolbox)
a. GCS – geodesic linear, area available but questionable
b. PCS – planar

http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000004m000000

Buffering Tool (and other tools coming)
a. GCS – geodesic
b. PCS – planar or specify GCS output http://resources.arcgis.com/en/help/main/10.1/index.html#//000800000019000000

Javascript API Clientside
a. GCS – geodesic area and length functions
b. PCS – can convert from web mercator to geographic (or use geometry service) http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_geometry.htm

Flex API Clientside
a. GCS – geodesic area and length functions, “The length [or area] will be calculated using a custom cylindrical equal-area projection”. This is not mentioned in the javascript api!!
b. PCS – can convert from web mercator to geographic http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/utils/GeometryUtil.html

ArcGIS Server REST API – Geometry Service
a. GCS – geodesic
b. PCS – planar

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/geometryservice.htm

Random Notes on ArcSDE

I find a lot of confusion on SDE issues out there.

Skinny SDE Intro

Here’s the DL, there’s two parts to SDE –
1. All the system geodatabase tables that enable editing, topology, replication, archiving, networks, versioning, etc., and then
2. A separate service on the database server for connections, that is, the old port 5151 stuff, you don’t use the normal database connections. This is deprecated — Esri now says skip this part 2 and just use direct connections unless there is a reason to create the SDE 5151 service.

Making your data accessible to ArcGIS Server

This says it better than me — http://resources.arcgis.com/en/help/main/10.1/index.html#/Making_your_data_accessible_to_ArcGIS_Server/01540000039r000000/

ArcGIS and Postgresql

You can setup postgresql or SQL Express and create a connection to them in ArcCatalog. Then you can import/create feature classes and connect to and view in desktop — but no editing with desktop — except — with a non-basic desktop license, you can enable an editable geodatabase in SQL Express, see below. In all other databases including postres, you have to have a ArcGIS Server license to enable geodatabase setup in postgres. Btw, Esri has moved to direct connect to databases — defaults to direct connect now in 10.1. You would need to install postgresql on the client if using it.

Multi-User SDE Editing

If you have ArcEditor or ArcInfo desktop level, you have the ability to use SQL Server Express as a multi-user geodatabase. Even though only one user can edit at a time, the locking and unlocking may be better than file or personal geodatabases. There lot’s of documentation on how to set this up, and you don’t have to be a dba. Though I like postgres, Esri just does not enable you to effectively use it without having an ArcGIS Server license — no offense QGIS folks ;)

If funding is an issue for your organization, but you have full fledged (fledged?) multi-user requirements, make sure that your Esri sales guy gives you a quote for “ArcGIS Server Workgroup”, not Enterprise. See below — you can have 10 concurrent editing connections. It should be more like $3-5k. Pricing http://www.esri.com/software/arcgis/arcgisserver/pricing

See also this post for a good explanation of the licensing and links about SDE and SQL Server Express ArcSDE desktop license http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_are_database_servers_in_ArcGIS/003n0000004r000000/

“You create geodatabases and perform other administrative tasks for database servers through the Database Servers node in the Catalog window or ArcCatalog. Performing the administration of the database server and its geodatabases through ArcGIS Desktop means there is no extra software or database administration expertise required for you to create and use these types of ArcSDE geodatabases.

Connections to the geodatabases on a database server are always direct connections; they use the ArcSDE library files in the client to make the connection. In this case, the client applications are ArcGIS Desktop at the ArcEditor or ArcInfo license level, ArcGIS Engine, and ArcGIS Server Workgroup.

The media for these products include installation files for SQL Server Express. Once you have created the SQL Server Express instance and run the wizard to enable the instance to store geodatabases, the libraries within the client application allow you to connect to and work with the database servers and create and work with geodatabases on the database server.

With ArcGIS Desktop (ArcEditor and ArcInfo) and ArcGIS Engine, you can set up a database server and create ArcSDE geodatabases that can be accessed by a few users and edited by one user at a time.

With ArcGIS Server Workgroup using ArcGIS Desktop, you can set up a database server and create ArcSDE geodatabases that can be accessed by up to 10 users at a time, all of whom can be editing concurrently. When using the database servers licensed through ArcGIS Server Workgroup, you can also connect to the geodatabases using Web applications, for which there is no connection limit.”

How do I create a drop down box / combo box of bookmarks from an ArcGIS Online webmap?

Without using the clunky ArcGIS bookmark dijit, how do I create a drop down box of bookmarks from an ArcGIS Online webmap (or JSON) that zoom to the extents when clicked?


//FYI, JSON format
"bookmarks": [
    {
      "extent": {
        "spatialReference": {"wkid": 102100},
        "xmax": -1.2251063434141435E7,
        "xmin": -1.2561092020865962E7,
        "ymax": 4977986.7113767695,
        "ymin": 4811659.737828305
      },
      "name": "Utah County"
    },
    {
      "extent": {
        "spatialReference": {"wkid": 102100},
        "xmax": -1.2615515185004937E7,
        "xmin": -1.3235572358454255E7,
        "ymax": 4310538.580390846,
        "ymin": 3977884.633293776
      },
      "name": "San Bernardino County"
    }
]

The only tricky part was needing to reset the selectedIndex on each change event of the html SELECT element so that you can repeatedly hit the same bookmark and the map keeps going back to the extent. Apologize for the mixed dojo and jquery.


//html for bookmark combo box, drop down box 
<select id="comboboxBookmarks">
    <option value="-1" selected="selected">Bookmarks...</option>
</select>

dojo.require("esri.arcgis.utils");

//getting the webmap from the query string of URL
var urlObject = esri.urlToObject(document.location.href);
if (urlObject.query.webmap) {
    setAGOLWebMap(urlObject.query.webmap);
}
else {
    //error
}

function setAGOLWebMap(webMapID) {
    esri.arcgis.utils.createMap(webMapID, "map", {
        mapOptions: {
            slider: true,
            logo: false,
            "fadeOnZoom": true,
            "force3DTransforms": true,
            "navigationMode": "css-transforms"
        }
    }).then(function (response) {
        map = response.map;

        //Populate Bookmarks
        bookMarks = response.itemInfo.itemData.bookmarks;
        dojo.forEach(response.itemInfo.itemData.bookmarks, function (bookmark, i) {
            $("#comboboxBookmarks").append($("