Using ArcGIS Desktop and Adobe Illustrator to create a poster mapping Solar Potential.

If you've recently visited our Office HQ in Aylesbury you may well have noticed a poster proudly displayed in the foyer showing Solar Potential Mapping. I've been producing a number of posters showcasing work that Esri UK are undertaking and this is one example. The poster explains how GIS can be used to model Solar Potential as part of some of the Low Carbon work being carried out by Esri UK. This blog article will briefly describe how this poster was created and the main tools which I used.  

Please click map for a higher resolution (2.2mb) version in a new window.

The Geoprocessing tools in ArcGIS Desktop were used to undertake all of the necessary calculations and create each layer used within the map. These were then combined with ModelBuilder to process the data for an area surrounding Oxford City Centre, an area which many people are familiar with. The cartography in the main map was produced using a combination of standard ArcGIS Desktop tools, Maplex for ArcGIS, Cartographic Representations and some of the more advanced Cartography tools to perform processes such as simplifying the road system. This combination of tools allowed me to create a very pleasing cartographic output. Each map inset in "The Process" box was also created as separate layer in ArcGIS and exported as individual images. 

For this poster I was keen not only show the interesting mapping outputs generated from calculating solar potential, but also to explain the broad process behind how to create these outputs. I hand sketched numerous layouts before deciding upon the one presented in the final poster. The layout of this poster, in particular the complexity I wanted to use in the process section, helped with my decision to use Adobe Illustrator for the final poster production.

All of the insets, logo's, titles, drop shadows, arrows, and text placement were carried out in Illustrator.

 

The process flowchart/diagram was also constructed in Abobe Illustrator. I was particularly keen that the round insets maps acted as "magnifying glasses" through to the appropriate layer of interest. This visually represents the power of a GIS being able to peel away layers of information to reveal more interesting data! All of the map layers and cartography for these were produced in ArcGIS and exported as TIFF images and then all placed in Illustrator. I used the greyscale duration layer as a basemap to add context mainly because I thought the output was so visually interesting! The geography of each "magnifying glass" matches the geography on the underneath. 

There are various different options for interoperating mapping between ArcGIS and Illustrator. For the purpose of this poster though I exported the maps out as high resolution images and then placed them into an Illustrator document. I decided to use this method mainly due to simplicity and I didn't want to modify any of the cartography within Illustrator. However, it is possible to export to Adobe .ai format from ArcGIS which is another option for working between the two applications. This will give you more control over the exported features so you can modify the elements in Illustrator rather than exporting just an image. If you decide to export from ArcGIS to .ai then there are a number of issues to be aware when creating your Map Documents (MXD's) prior to exporting. These include not using transparency in your layers and also not nesting your layers in the Table of Contents. 

As ever, the Esri Mapping Centre has a wealth of information and tips for working with cartography in ArcGIS. There are also some Illustrator specific articles which can be found here
In a future post I will consider some more specific tips and tricks of exporting content from ArcGIS to Adobe Illustrator. If you have any suggestions for future blog topics of a cartographic nature or if you have any further questions or comments about the Solar Potential Mapping poster then I would be delighted to hear them.

 

More information on the Low Carbon work at Esri UK can be found
at http://www.esriuk.com/industries/lowcarbon and the Solar Radiation Geoprocessing tools here.

Time to upgrade

I guess it's coming around to the time when customers who jumped to ArcGIS 9 or 9.1 are again thinking about moving up to the latest releases. Combined with that, the DBMS of choice back then - maybe 6 years ago now, may be out of support now so a new DBMS release is part of the plan too. Hence I get emails dropping in along the lines of "we are on ArcGIS 9.1 Oracle 9i and want too move to ArcGIS 10 Oracle 11g, what is the best upgrade path".

Now these questions are being asked because they will have discovered the conundrum, ArcGIS 10 doesn't support their 9i, ArcGIS 9.1 doesn't support 11g so which way to jump.

My response to this is, hang on let's step back a bit and look at the bigger picture.

Firstly the hardware, presumably this is now 6 years old also and server perfromance has moved on and prices come down so you get more for your money than you did when the old system was installed.

Secondly, is the geodatabase which you want to move really that clean? What "mistakes" have happened over the 6 years which have been recovered from, what versioned editing/compress horrors are lurking and what classes where created in a rush of enthusiasm and have never been referenced since. Are there flaws in the permission model which should be rectified. Also if the original system used shared logfiles how much space is wasted in logfiles, maybe belonging to people long gone from the project.

Thirdly is upgrading the database completely transparent? Reading the SQL Server 2005 documentation soon shows that an upgraded database from 2000 somehow isn't quite as clean as a fresh 2005 db - and of couse we are now on 2008.

I'd therefore suggest that it is really worth considering starting again, Get a new server, install the latest db, Oracle 11g, SQL Server 2008, PostgreSQL;  bear in mind that you could change dbms at this stage. Create a new geodatabase and use the ArcGIS tools (maybe with the backward compatible direct connect drivers) to copy the data into the new database. This will doubtless throw up new questions like how to tidy up the versioning model etc but in the long run will be worth it. The result should be a clean database automatically created with high precision coordinates. Versioning can then be added and a permissions model. The logfile settings can use session logfiles possibly with temporary tables.

This may also be an opportunity to consider the spatial type. If the existing database is SDE Binary consider changing to ST_Geometry (Oracle) or Geometry (SQL server). Also review any Raster data in the old database and consider whether the new Mosaic datasets offer improved performance and maintainability.

If archiving of edits is of interest now is the time to switch it on, plus if geodatabase replication is on the horizon, add GUIDs to the classes which will be involved.

Whilst it may seem to be a lot of work in the short term, and may involve making decisions that it would be easier to sweep under the carpet, I think for many sites this is the only realistic way forward and will ensure a future-proofed ArcGIS 10 solution.

So, go on then, pick up the phone and order that server. It'll make sense in the long run!

ArcPy demonstrations from the 2011 UC

Earlier this week I presented a session on using the ArcPY site package to manipulate map objects. I decided to take this approach since the standard geoprocessing through python is quite well known now. It turned out to have been a timely presentation since only yesterday ESRI announced a new online course on the subject http://training.esri.com/acb2000/showdetl.cfm?DID=6&Product_ID=1011

I also demonstrated a tool validator class which isn’t exactly new (it was introduced at 9.3) but which is little used functionality within the model/scripting framework. I realise that whilst the slides will be published there wasn’t much there without the demos. This article is partly to redress that by attaching the scripts I used so that anyone can download them: 

https://static1.squarespace.com/static/55bb8935e4b046642e9d3fa7/55bb8e8ee4b03fcc125a74c0/55bb8e90e4b03fcc125a7933/1306326540373/ArcPydemos.zip

Note that throughout the demos I chose to mix and match Arcpy and core (or OS module) methods. In many cases these are interchangeable when dealing with disk files.

The first demo centred on adding a feature class as a layer in a map. Much of the processing relies on creating a temporary disk file for the layer and this is then added to the map. I also played with the progressor bar in this, although it is fairly quick so you have to be watching to see it change.

The second demo iterated through the layers in a map and re-pointed these from an FGDB to an ArcSDE geodatabase. It was, in fact, a personal ArcSDE gdb on my machine but the same logic applies for an enterprise geodatabase. This showed the simplicity of looping with python lists and required nested lists to iterate through layers within data frames within the map. It also shows the perverse way in which group layers are handled. When I started the script I imagined that I’d iterate through a group layer if I found one but the demo2 script shows this is not the case. The layers are presented in the order they are in the TOC as if all the + toggles are hit. So the group layer appears in turn and the next layer is the first in the group. Once all the layers in the group layer are accessed the next layer is whatever is in the TOC after the group.

Due to time constraints I didn’t get chance to talk about the error handling. As a result of making the whole thing more “pythonic” it is no longer enough just to output the arcpy.GetMessages(2). Many of the errors are raised as python errors; assertion error, type error etc. and these have to be trapped by using the sys methods and the traceback module to report on these errors. The demos both show a rather crude example of this which has the essential steps to get the python error codes out of a failing script.

The final demo is a simple tool validator class to extract all the feature classes from a FGDB and use the list to populate a value list on a string field. While the example easily shows what could be done it is not especially useful as the field has to be of type String not FeatureClass for a value list to be applied to it. The called script therefore has to establish the workspace in the same way as the tool validator has. Take care writing code in a tool validator, it can be very hard to debug. Also ensure that it is in the correct place, initialise, update or message. InitialiseParameters runs as the tool opens. UpdateParameters runs whenever a parameter is changed by the user. The code must determine whether a parameter that is being “watched” has changed; there is no distinction in the invocation of the class method.

One of the biggest strengths of choosing python is that it opens up a whole range of prebuilt packages to perform tasks. Yesterday I was advising on using python modules to zip files and directories once geoprocessing has completed and investigation revealed that at least 3 (zipfile, gzip and tarfile) are packaged with the default python 2.6 installation.

I hope you find the demo scripts useful, and if you attended the session I hope you enjoyed it. Thanks, Rob

Using OS MasterMap Annotations in ArcGIS 10 Basemap Layers

Prior to ArcGIS 10, we had a nice little free application called the Cartographic Text Renderer which essentially labelled the Ordnance Survey MasterMap Annotation layer. Whilst this is a great little tool for pre- ArcGIS 10 installations this doesn't work correctly at 10. Also the new basemap layer renderer are incompatible with the labelling methods used in the tool.

(Basemap layers were new at ArcGIS 10 which are a group of layers that draw continuously during navigation and significantly improve the display speed and responsiveness of the map. If you’re not using them already then they are definitely worth investigating. Further information about them can be found in the following blog post. )

So, if you want to be able to use OS MasterMap annotation in a basemap layer, then you could use the following method in ArcMap:

  • Enable labels on the OSMMANNO layer
  • Goto “Placement Properties” under “Other Options”
  • If using the Standard Label Engine ensure that “On the line” is checked. If  using Maplex then you will probably want to use Street Placement and make further modifications/tweaks to your labels as you see fit.
  • Add the following as a label expression: "<FNT name='Arial' size='" & [TEXTHEIGHT]*5& "'>" & [TEXT] & "</FNT>" (including the quotes)
  • Of course at this point you can change the way the label looks!… for example, I also quite like "<FNT name='Gill San MT' size= '" & [TEXTHEIGHT]*4& "'>" & [TEXT] & "</FNT>"
  • Optional: Click on the “Symbol” button in the “Text Symbol” area
  • Optional: Click on “Edit Symbol”, and click on the “Mask” tab
  • Optional: Add a Halo of 0.5 to the layer
  • Click OK/Apply to all windows

At this point you could use the newly labeled layer in the Basemap Layer. To do this you just need to drag the layer into the basemap layer. However I’ve found that converting it into Annotation performs better. So to do this you need to complete the following:

  • Zoom to 1:800
  • Right click on OSMMANNO and click “Convert Labels to Annotation”
  • Choose the “In a Database” option for “Store Annotation”
  • Choose the “All Features” option for “Create Annotation For”
  • Un-tick the “Feature Linked” box
  • Click on the file symbol to set the output file location and name
  • Click “Convert” (performance will depend on amount of data)

The annotation layer created using this process won’t look exactly the same as the results achieved using the Esri UK tool but it will be near enough and also perform well in the Basemap layer. And here is the result:

If you’re still using ArcGIS 9.3.1 the Cartographic Text Renderer is a great way to label the OS MasterMap Topo Layer. The Cartographic Text renderer can be downloaded from MyESRI UK.

TwitterLinkedIn