Skip navigation
All Places > Open Platform: Standards and Interoperability > Blog > 2020 > July
2020

We have previously written about Geopackage support in ArcGIS Pro 2.6, but a lesser known fact is that ArcGIS Online and ArcGIS Enterprise also allow exporting Esri services as OGC GeoPackages

 

This "hidden feature" is not currently exposed in the Item Page user interface for "Export Data"...yet.

 

However, it is exposed at the Server as the Create Replica REST API service endpoint. This feature allows Hosted Feature/Raster and Vector Tile Service layers to be exported as GeoPackages.

 

If you are navigating in the Browser, you can just go to Create Replica Operation as part of the Feature Service HTML user interface. 

 

 

How to Download a GeoPackage

 

In order to get this Create Replica API endpoint, you first need to Enable Syncing on the Feature Service. You can get to this in the Item Page, going to the Settings tab..

...scroll down

  

 

Then go to the Service URL, for example:  https://services.arcgis.com/XTtANUDT8Va4DLwI/arcgis/rest/services/Territorial_Authority_2019_Clipped_generalised/FeatureServer/createReplica 

 

Set the key @@Parameters as follows:

  • Layers : 0 (or whichever layer you want to download)
  • returnAttachments : false
  • async : true
  • syncModel : none
  • syncDirection: download
  • DataFormat : GPKG

 

Export Geopackages from Hosted Services

 

Then 'create Replica" will initiate the creation the GeoPackage download file and provide a Status URL at the bottom of the page.

 

 

Click the statusURL, and at this Status URL, once the processing is complete, you will receive the "Results URL" as per below.

 

Finally, click the Results URL and the file will download locally. Then open it up wherever GeoPackages are supported.

 

From ArcGIS Pro, just Add Data and navigate to the downloaded file.

 

...and, voila!

 

Of course, given these are API calls, these steps can be set up programmatically as part of a regular ETL workflow, e.g. scheduling an ArcGIS Notebook to run and use the ArcGIS API for Python or scheduling a job to run using a workbench created in the no-code ArcGIS Data Interoperability Extension and use the HTTPCaller transformer.

 

Here's the download Geopackage example REST API call: 

(POST) https://services8.arcgis.com/QQGMu3AgoCvivmaQ/ArcGIS/rest/services/Nashville_Bldg_Permits/FeatureServer/createReplica?replicaName=&layers=0&layerQueries=&geometry=&geometryType=esriGeometryEnvelope&inSR=&replicaSR=&datumTransformation=&transportType=esriTransportTypeUrl&returnAttachments=false&returnAttachmentsDataByUrl=true&async=true&syncModel=none&targetType=client&syncDirection=download&attachmentsSyncDirection=none&replicaOptions=&dataFormat=gpkg&f=html&token=

 

If the item is public just subsitute the relevant parts of your item's Service URL. If the item is private you'll also need to generate and append a 'token' at the end of this string.

 

If you are not a developer, this URL won't work by just putting it in a browser because it requires an HTTP POST method, and browsers follow GET method by default, so you'll have to use some tool like Postman.

 

Happy downloading!

 

geopackage arcgis-online arcgis-enterprise

The 2020 Esri User Conference has many sessions on the ArcGIS Open Platform. We want to make it easy for you to work successfully in a heterogeneous environment. To create an open and interoperable system, Esri has adopted a multifaceted approach, including support of: standards; direct integrations with non-GIS technology; direct read & write of hundreds of data formats; open developers’ tools; ETL tools; metadata; open source; open data sharing; and SDI.

 

 

Please visit us at the

Open Platform: Standards and Interoperability Esri Expo Area

Join Us in our Chat Room! or Schedule a Meeting

 

Links will require conference registration until made public.  Not registered? Click here to register for the Esri UC 2020, July 13–16, 2020 | The world’s largest, virtual GIS event.

 

Check out these sessions at the Virtual UC:

To learn more about Esri’s Open Platform approach and our next generation SDI work visit:

 

Stay Connected on GeoNet

 

Other Resources

 

Esri UC 2020 Q&A

The Esri UC 2020 Q&A is chalk full of what you want to know. To learn more details on our Open Platform approach, start with ‘Components of ArcGIS – Open/Standards/Interoperability/ Metadata’.
 

User Conference

Esri

Open/Standards/Interoperability/Metadata

ArcGIS

Components of ArcGIS – ArcGIS Pro

Components of ArcGIS – ArcGIS Enterprise

Components of ArcGIS – ArcGIS for Developers

Capabilities of ArcGIS – Spatial Analysis and Data Science

Capabilities of ArcGIS – Imagery and Remote Sensing

Capabilities of ArcGIS – 3D Visualization and Analytics

Capabilities of ArcGIS – Data Management

Capabilities of ArcGIS – AEC and Asset Management?

 

Prepared with the assistance of my colleagues Jeanne Foust and Jill Saligoe-Simmel

Data Interoperability (or FME) users whose organizations secure access to ArcGIS Online using Okta need to do a little work to make FME Workbench web connections to their Online organization.

 

Okta is one of many identity providers available for securing ArcGIS Online sign-on.  You can check Okta and other options at this site.  If you attempt the usual web connection creation experience however you'll get rejected at the very last step with an error from OAuth2, this post is about making it work.

 

The first step is to make an App item to hang the connection off.  In a browser, go to your org's home app and log in.  Lets say my home is https://geo-demo.maps.arcgis.com/home/index.html.

 

 

Authenticate using the Okta option, then go to your Content pane and add an App item.

 

Choose 'An application'.

 

 

Make sure you select Application app type and give it a name and some tags:

 

Then go to the item Settings tab, scroll down to the Registered Info details and choose to Update the details, and add a Redirect URI with the value http://localhost.  Your details will look like this (App ID will differ):

 

 

Copy the App ID value and App Secret values into a text editor.  You need to Show Secret to expose the value.

 

Now start Workbench from the Analysis ribbon in ArcGIS Pro and under the Tools menu select FME Options and activate Web Connections:

 

 

Click on Manage Services at bottom right and when the dialog appears click the small pull-down in the Add Web Service control and choose Create From > Esri ArcGIS Online.

 

 

 

 

Give the service a meaningful name and description, enter the App ID retrieved earlier into the Client ID value and enter the App Secret retrieved earlier into the Client Secret.  Replace the Redirect URI value with http://localhost.

 

 

Use the Test control to bring up the authentication dialog and choose the Okta option:

 

 

My org uses multi-factor authentication so I am invited to send a push (you may not see this):

 

 

Then save your changes and Close the Manage Web Services dialog:

 

 

Now back in the FME Options > Web Connections dialog click the Add Connection control (the + sign bottom left)...

 

 

...and your shiny new Okta authenticated web service option for ArcGIS Online is available to make a connection:

 

 

Scroll down to the service name, authenticate and you're done!

 

 

Here is mine: