3D Data visualisation ArcGIS to CityEngine

Another quick post as I’ve been experimenting for a project with data from ArcGIS, simple stuff like using a spatial join to count points within polygons. But here CityEngine allows you to quickly model that data in 3D, ¬†I didn’t write a special rule for this I used one I already had and where there was a height attribute in the rule file I joined it to my simple count attribute in the imported polygon layer.

Hexagons are the only way to visualise this stuff honestly... :)
Hexagons are the only way to visualise this stuff honestly… ūüôā

This type of visualisation helps us to understand the urban core and where there are higher concentrations of shops. ¬†In the image above we had a survey done of the number and location of shops in a defined area within a city core in Iraq. ¬† ¬†Simple numbers but difficult to sometimes interpret on a 2D map. ¬† The hexagon polygons are fairly¬†coarse here I’ll probably make them smaller when it comes to finalising the work…

The end result may well be one of those webscenes that CityEngine produces so well.

Review: Cartographers Toolkit – Colors, Typography, Patterns

I don’t often write reviews but I’m thinking of doing it more often, that way at least there’s a break from CityEngine and ArcGIS talk!

Increasingly I am finding myself struggling to make maps, there are so many options and so many tools out there it’s difficult to know where to start. ¬† I realised I needed the basics, I needed a reference book with workable examples and things like fonts and hex colour codes, then I saw this book…

Do you make maps? Do you use a GIS package and spend too much time creating symbology for your maps? If the answer is yes then this book is for you! It’s a great reference for making good looking and legible maps. Need a colour scheme that works? The author has included hex, rgb an cmyk codes with her large sample of coordinated palettes.

Need inspiration for choosing the right font? This book gives example maps and text in a variety of fonts (free and fee fonts). The last section is a good selection of inspirational maps under the heading ‘composition patterns’. Each mapping style has a good set of example maps as well as guidance text on usage and how to achieve these styles.

This is not like her first book “GIS Cartography” which was far more in-depth and quite a heavy read. Cartographers Toolkit is one you want to have on or near your desk whilst setting up mapping styles.

One last thing to note, this book does not rely on knowledge of a specific piece of software (ArcGIS, MapInfo etc..).

You can follow the author Gretchen on Twitter (http://twitter.com/PetersonGIS) or read her blog at http://www.gretchenpeterson.com

I have posted this review in part on Amazon UK as well.

You purchase the book here : Cartographer’s Toolkit

Summary: It’s a toolkit for people who make maps, didn’t you read the title?!
Why? Stuck for insipration? Need a code set of hexcodes for your symbology?
Rating: 4/5 whilst most of the guidance is universal it is a bit american centric (in terms of advice on styles etc..)

CityEngine rule creation using Excel

Okay I’m a planner so I use Excel a lot especially for population statistics and analysis of landuses and planning standards. ¬† It would be nice to turn some of our planning standards tables into rule files for CityEngine to make. ¬†For now though I’m trying out a number of workflows to test plot sizes.

What I wanted to do was choose the colours of my plots based on its area, this method allows me to pick a cell fill colour in Excel and run a macro over it to create the hex code which using the magic of CONCATENATE function creates the correct syntax.

The Excel sheet you see above can then be copied and pasted into a CGA rule file in CityEngine, the results below show that the colours I’ve choosen have come in well in CityEngine….

Why use this method? ¬†Well I’m thinking of combining some of our data within CityEngine and this could be a handy way of doing it. ¬† Here I can relatively easily copy additional test areas once and excel, using formulas, can create the rest of the rule file.

I’ll be posting a test Excel sheet soon here, as well as the macro code for take a cell fill colour and creating the hexadecimal code from it.

UPDATE(02/08/2012) You can download the Macro-Enabled Spreadsheet from this post.

UK local online #mapping is a stupid mess…

Yuck, online mapping 1990s style

Today something is bothering me, ¬† it has been bubbling away since I wrote this post¬†“The Awful mess of Local Plans online”¬†and I can’t contain it anymore.

Where’s my broadband coordinator? Cumbria CC

Cumbria as a geographic area I think has a lot of online maps and they all vary in quality and¬†usability. ¬† Sometimes it looks like the people who are operating them haven’t told other departments what they are doing…. to be fair they probably have but red tape has got in the way…

Lets take¬†Sedbergh¬†(yes I used Google Maps!) for example, if I want to see what services my local authorities’ provide on a map I can go here for¬†Cumbria CC services¬†but if I want to see their Public Rights of Way mapping (and the two national parks),¬†I have to go here. ¬†Now Cumbria also has a Historic Environment Record and their mapping is here¬†(seriously slow & doesn’t always work).

Walk this way , Cumbria PROW map
Cumbria’s Historic Environment Record mapping is shit, no really

Now here’s the fun bit, bins, building control and libraries are dealt with by South Lakeland DC¬†. ¬† Ah, but if I want to see my local plan online rather than via PDF I have to go to the Yorkshire Dales online GIS here. ¬† Oh and if I forget what Local Authority I’m in Eden DC provide some mapping for part of Sedbergh too.

Eden Web Mapping, basic but okay?
South Lakeland’s mapping just like Barrow’s and I quite like it..

All these maps provide detailed OS Mastermap level mapping. ¬†Some are symbolised quite well, others not so well, I’ve always liked Barrow’s online GIS which South Lakeland seem to use, but that’s because it’s a bit technical and I hear open source¬†[PDF]. ¬† I also worry when watermarks aren’t done well.

As a resident I shouldn’t have to check 5 different online maps to check out what’s happening in my area. ¬†I certainly¬†shouldn’t¬†have to learn how each one operates!¬†(look I used bold and underline I must be serious)

I can’t help wondering why no one is trying to get a national government mapping organisation whereby everyone gets the same online mapping frontend/interface but is in charge of their own data. A¬†bit like the Planning Portal¬†but for publishing data not just¬†receiving¬†it. ¬†If people think this can’t be done, I think people working on the EU’s INSPIRE directive might say otherwise.

What I would like to see is web mapping become central not just an after thought to local and national government websites. ¬† Yes there is a place of localisation (depending on usage, tourism, history etc…). ¬† But a national web mapping site is needed so we can¬†seamlessly¬†browse geographically adjacent datasets. ¬† This would be great not just for residents but also policy makers, politicians and professionals. ¬†Imagine for example, seeing planning statistics and local plans for neighbouring authorities on one¬†seamless¬†map? ¬† Local councillors could see how neighbouring areas with similar demographics are doing. ¬†Think how easy consultation with neighbouring¬†councils¬†could be!

Enough of my musings, I’m off to make a map for a local authority in Iraq….

Related Posts

 

Using satellite imagery as roof textures in CityEngine

Before we start the code I used here came from a GIS mapping tutorial from CityEngine, I can’t seem to find the original page after them being merged with ESRI but you can see a cached copy of the page here.

First let us get some satellite imagery, I suggest you use an extract from an existing satellite imagery from your GIS. If you are taking the imagery from elsewhere you don’t need to follow all these steps…

  1. In ArcGIS — Draw a box using the Draw toolbar
  2. In ArcGIS —¬†Select the underlying imagery in the Table of Contents right-click and select “Data –> Export Data”. Depending on what your are doing and the size of imagery you want you may want to use JPG and the settings below have worked for me. I suggest you experiment for the best results. I also suggest you export straight to the maps directory in your CityEngine project
  3. In CityEngine — Drag and drop from your maps directory into your CityEngine scene, it should come in under any data you already have. If it doesn’t check that in the Scene window the map layer does not have the eye crossed out also ensure that the show/hide map layers button is clicked.
  4. In CityEngine —¬†Create a new rule file and copy this code in (be sure to change the relevant parts to your settings).
    # dimension of the satellite map
    const mapdimension_x = 1134.181 #change this to satellite image details
    const mapdimension_z = 939.650 #change this to satellite image details
    # offset of the satellite map
    const mapoffset_x = 597694.521 #change this to satellite image details
    const mapoffset_z = -3560369.907 #change this to satellite image details
    Lot-->
    extrude(rand(3,15)) Mass
    Mass -->
    # split building mass into roof and side faces
    comp(f){top : Roof | side : Facade}
    Roof --> Rooftex
    Rooftex --> 
    setupProjection(0, world.xz, mapdimension_x, mapdimension_z) 
    set(material.colormap, "maps/SATELLITEIMAGENAME.jpg") #change this 
    projectUV(0) 
    translateUV(0, -mapoffset_x/mapdimension_x, -mapoffset_z/mapdimension_z) 
    scaleUV(0,1,-1)
  5. In CityEngine —¬†To get the x-size and x-offset numbers select the map layer in the Scene window (default location bottom left) and look at the Layer tab in the Inspector window (default right), copy these numbers to the const variables at the¬†beginning¬†of the rule file.
  6. In CityEngine —¬†Now apply that rule (after changes to your shapes/lots) and generate your model!