archive

Archive for 2010

Boxplot

Thursday, August 26th, 2010

Great script (in CSS and Javascript) which makes it really easy to display boxplots on a website. Great!

Excel: Concatenate Multiple Fields

Tuesday, August 24th, 2010

Wonna concatenate numerous fields to obtain all values in a single cell? Here’s the script:

Sub ConcatenateAll()

Dim x As String, rng As Range, cel As Range, v_new As Integer, v_old As Integer

With ActiveSheet

Set rng = .Range("F2:F2736")

For Each cel In rng

v_new = Int(cel.Value)

If (v_new <> v_old) Then
x = x & "," & Int(cel.Value)
End If

v_old = v_new

Next

.Range("G2").Value = x

End With

End Sub

And in order to insert a little bit more complicated string in ArcGIS’s Field Calculator, you need to do this:

"<img src='http://localhost/graph.php?data=36,36,37," & Int([wohnfl_per]) & "' />"

ArcMap: Convert a value to NoData (IsNull)

Tuesday, August 24th, 2010

Easy, easy… In Spatial Analyst -> Raster Calculator do:

isnull([My Raster] <= 0, [My Raster])

ArcMap: Raster Data

Tuesday, August 17th, 2010

Just working with some extensive raster data sets. And running into a problem – that is, the values of the raster, although integer, are not being displayed. Here is a solution:

Use the “Build Raster Attribute Table”. And if an error is coming up concerning the reaching of a limit, then use the advanced settings utility has an option to set maximum number of attribute entries.
The utility should be in your install location in the Utilities folder (by default – C:\Program Files\ArcGIS\Utilities). Run the AdvancedArcMapSettings executable and select the Raster tab.

Debugging AJAX

Monday, August 16th, 2010

Need to debug AJAX? Beside some tips I found on the Net, here is one I found particularly useful, at least in my current case. Just use a

tail -f /private/var/log/apache2/access_log

Or

tail -f /private/var/log/apache2/error_log

which displays the latest log entries… which can help to solve some major issues.

Solartaxi

Monday, August 16th, 2010

Great project. Traveling around the world with solar energy. Wow!

Air Traffic Visualization

Sunday, August 15th, 2010

Great visualization of 24 hours of air traffic. Shows well, similar to the Nightlights of the Earth, which regions of the globe are not connected. Impressive!

Nightlights of the Earth

Sunday, August 15th, 2010

Population Distribution

Friday, August 13th, 2010

Attractive and interesting way to sum up the global population.

ArcGIS to SLD

Tuesday, August 3rd, 2010

Gush, sometimes feeling as we’re still living in the 80ies. How do you get data from ArcGIS to GeoServer, classes & colors including?! No easy task. Here is a small lib which makes the export from ArcGIS to SLD possible (with some additional explanations here). Thanks a lot!

Export to Mapserver

Tuesday, August 3rd, 2010

Gix, this extension helps GIS developers to migrate ESRI ArcView projects to the most popular Free and Open Source alternatives for Geographic Information Systems (GIS).

Interactive Map

Tuesday, August 3rd, 2010

Like that one. Lightweight, easy, supply of additional information by mouseover. Really neat.

Mapserver

Tuesday, July 27th, 2010

Nice mapserver, enabling vector display as well. Based on GeoExt.

ArcGIS: Calculating Area of a Polygon

Monday, July 5th, 2010

If you need to calculate the area of a polygon layer in ArcGIS, you can do so in ArcMap.

Use ArcGIS Desktop Help (available from the ArcMap interface) to get basic directions – under the Index, search for “area” – you should then see “Calculating for Polygons”

These directions have been tested and they work well. However, before you do this, there are some things you need to check.

A note about coordinate systems and area calculations
First, make sure that your data layer is in a defined projected coordinate system, like State Plane or UTM. You need to know what the map units of the data layer are (usually feet or meters), because once you calculate area, the area calculation will be in those map units.

If your data is not projected (e.g., it is in a Geographic Coordinate System, meaning decimal degrees) it would be wise to project it first. In the Data Frame Properties, change the coordinate system to a projected coordinate system (e.g., State Plane NAD83 (feet) Texas Central. Then right click on the data layer and choose Export Data. In the dialog box that follows, choose to create the new data set in the Data Frame’s coordiante system (now set to a projected system). This will create a new projected data layer, that you can then add to the Data Frame. From that point, you can follow the directions in ArcGIS Desktop Help for calculating area. If the data frame units were in feet, the area calculation will be square feet.

To convert square feet into square miles or acres or hectares, you need to add a new field to the attribute table (e.g., sq_mile), then use the Calculate Values tool to have that field = the area field x the conversion factor. To get the conversion factor, see Peter Wallin’s the Conversion Table for changing measurement units.

Creating an “area” field in your attribute table if you don’t already have one
If your attribute table does not already have an “area” field, you need to create one before doing the area calculations. You can create the new field in ArcCatalog or ArcMap. Note you can add an acres field using these same directions.

To create a new attribute field for “area” in ArcMap, follow these directions – note you cannot be in an editing session to do this (don’t ask me why):

  • Open the layer’s attribute table in ArcMap
  • Click on the Options tab
  • Choose Add Field
  • Name it Area
  • For Type, choose Double
  • Don’t put anything under Precision or Scale.
  • Click OK

Calculating area for polygons (from ArcGIS Desktop Help)

  • Open the attribute table of the layer you want to edit.
  • Right-click the field heading for area (if there is no field for area values, you can add a new field for area by clicking the Options button and selecting the new field option).
  • Click Calculate Values.
  • Checkmark the Advanced box (this is important – dont’ forget this!)
  • Type the following VBA statement in the first text box (you should be able to copy and paste):
    Dim dblArea as double
    Dim pArea as IArea
    Set pArea = [shape]
    dblArea = pArea.area
  • Type the variable dblArea in the second text box (near the bottom of the dialog box) directly under the area field name.
  • Click OK.

Visualization of Vessel Trajectories

Friday, July 2nd, 2010

Source

Sankey for Football

Friday, July 2nd, 2010

Source

TED: Sir Ken Robinson: Bring on the learning revolution!

Monday, June 14th, 2010

TED: Brian Skerry reveals ocean’s glory — and horror

Monday, June 14th, 2010

Public Data and theirs Mashups

Thursday, March 18th, 2010

Datamob highlights the connection between public data sources and the interfaces people are building for them.

GEO Data Portal – Dynamic Link

Monday, March 15th, 2010

Map derived from UNEP GEO Data PortalTesting WMS Feature of the GEO Data Portal.