Customise Download Script

Elgin Roadworks data no longer support

Due to changes to the API and data we are not currently supporting the Elgin System Connection. Please contact the Astun Support Portal if you require any further information.

Astun supply a python script to download the Elgin data but you will first need to customise it for your connection details.

First you need to copy the supplied feedxml-elgin-download.py which is in Studio\config folder e.g.

D:\Astun\iShare\n.n\Studio\config

and name it something like feedxml-elgin-download_mycouncil.py.

If your version of Studio does not already include the python script then please request this via the Astun Support Portal or your Astun consultant.

General Connection Details

XMLpath

Enter the path to where you wish the Elgin data to be copied e.g. D:\Astun\Data\Elgin\\. You need to make sure that you include the double backslash at the end of the path.

Code snippet
XMLpath = ""


Elgin

These are the required parameters for the request to the Elgin server.

User: The User given to you by Elgin for connecting to their server.

Password: - The password for user.

Polygon: - This is a space delimited list of BNG [British National Grid] coordinates for your MBR [Minimum Bounding Rectangle] e.g. "512500 393500 512500 418000 534000 418000 534000 393500"

ServiceURL: - Your website URL e.g. "www.MyCouncil.gov.uk"

OrganisationID: - The organisation ID  associated with the user

OrganisationName: - The name of your organisation e.g "My Council"

Code snippet
Elgin = {
    "User" : "",
    "Password" : "",
    "Polygon" : "",
    "ServiceURL" : "",
    "OrganisationName" : "",
    "OrganisationID" : "",
}

The OrganisationID and OrganisationName are no longer provided by Elgin so just enter a dummy 4 figure number for the OrganisationID [7289 definitely works] and your own Organisation name for the OrganisationName.

Using a Proxy Server

useProxy

Change to True if you are using a Proxy Server to connect to Elgin.

Code snippet
useProxy = False


NTLM

If you change useProxy to True then you must also enter the following proxy authentication details in the following section:

Domain: - The domain for the defined user.

User: - The user name for the local user who has access to the Internet via the proxy server.

Password: - The password for the user.

Code snippet
NTLM = {
    "Domain": "",
    "User": "",
    "Password": "",
}


URL & Port Number

You will also need to specify the URL and the Port Number for the local proxy server in the following section:

Code snippet
if (useProxy):
  curlObj.setopt(pycurl.PROXY, 'proxy.xyz.net')
  curlObj.setopt(pycurl.PROXYPORT, int(8000))