Configuring Asset Bank for GIS
To see how Asset Bank can be used when GIS is enabled, please read the following article:
Step 1: Activate the functionality
You need to gain access to your ApplicationSettings.properties file (or if hosted by Asset Bank, then speak to the support team).
Relevant settings, including some suggested values are:
# Whether the Geotagging and Search functionality is enabled
spatial-enabled=true
# The default map to use for spatial search
spatial-seach-map-type=google
# List of enabled maps for spatial search. Comma separated list of pairs, eg 'google|Google,arcgis|Arcgis'
spatial-seach-maps-enabled=google|Google
# Distance in km for the 'Find nearby items' function on view asset
spatial-search-nearby-distance=500
Once the have been set, the file saved and your Asset Bank application re-started (to read the changes) you can then move onto the next step.
Step 2: Set up your Google Maps Javascript API Key
To use Google Maps with Spatial Area attributes you need a valid API key. Without setting this up and using it within Asset Bank it will not be possible to view any maps within Asset Bank.
To set up a Google Maps Javascript API Key please follow this guide. From July 16, 2018, Google requires you to enable billing in order to use the Maps API.
When your API key has been set up, log into Asset Bank and enter your key at Admin > System > Settings > Attribute Settings > Google Maps API Key.
NOTE: For security reasons it is recommended that you restrict your API key to only be used on the domain of your Asset Bank site.
Step 3: Configure the front end
Spatial area attribute
The next thing to do is to create a spatial area attribute. This is where you will store the GPS information in Asset Bank.
If you go to Admin > Attributes > 'Add a new attribute' you will now be able to select 'Spatial area' from the list of options. Select this.
Give it a name (perhaps 'asset location' if it will apply to video as well as images?) and complete the other fields as necessary.
Single point or area?
There is an option to choose single point or area. The former is ideal for single points on a map, e.g. where an image has been taken. If you do not choose this then you will create a spatial area instead. This will require two sets of co-ordinates, which will form a rectangular area. This would be more relevant for a satellite image of a city for example, or other things you'd like to link to an area rather than a single point. However, if you choose area, and then just upload photos with a single GPS position, then this is fine. Asset Bank will just populate both sets of co-ordinates with the same values. So a point will still behave like a point - e.g. it will display as a point rather than an area on a map.
Extracting your GPS data from your camera into this new attribute
Next, go to the embedded data mappings in Asset Bank:
Admin > Attributes > Embedded data mappings
Choose your new 'asset location' attribute. Then choose Embedded data type 'Other'. You will now be able to access a drop down (Embedded data value) that gives you GPS options.
Choose GPSPosition Signed to generate a point on a map. (Other mappings are explained on this page: GPS Mappings.)
Finally, choose the Upload direction and click 'Add'.
Step 4: Try a test upload
This will only extract GPS information if it exists in the first place in the image itself. I.e. the image will have been shot with a camera that embeds GPS info. Once uploaded you should be able to access all of the GPS functionality as described in the blog article linked to from the top of this page including:
- see asset on map
- find nearby items
- search on a spatial area from the advanced search page
Admin > Attributes > Display Attributes > 'Searching' > Advanced search form
Comments
0 comments
Please sign in to leave a comment.