Archive

Archive for the ‘GIS’ Category

Denver’s Open Data Initiative

January 26th, 2013 Comments off

I recently had the opportunity to give a talk about Denver’s Open Data Initiative at the Denver Regional Council of Governments 5th Annual Regional Data Summit.

The presentation tells the story of Denver Open Data Catalog, a central component of Denver’s Open Data Initiative.

The City of Denver’s Open Data Catalog went live in July of 2012 and is powered by OpenColorado.

A Model for Open Data In Colorado

September 21st, 2012 Comments off

Presented at the 2012 GIS in the Rockies Conference with Justin Lewis from the Denver Regional Council of Governments.

FOSS4G 2011 Presentation: Mixing It Up with OpenLayers, ArcGIS Server and JavaScript Widgets

September 23rd, 2011 Comments off

We recently had the opportunity to present at FOSS4G 2011, the premiere international conference for open source geospatial software that was held in Denver this year (right across the street).  There were over 900 attendees and it was an excellent conference.

Our presentation focused on the idea of using open source software with closed source software and the presentation highlights the success we have had in using this hybrid approach.

After we gave our presentation, I was approached by an audience member that was the original author of the AgsJSAdapter that we talked about in our presentation.

We have made several changes to the adapter to remove the dependency on the ESRI ArcGIS Server JavaScript API and we’ll try to get the changes posted back for others to use.

GIS in the Rockies 2011

I have also uploaded a previous presentation that we gave at GIS in the Rockies 2011 that goes more into the mechanics of building maps as distributed JavaScript widgets.

Presentation – Building Distributed JavaScript Map Widgets

March 30th, 2011 3 comments

I gave a lightning talk at the ESRI Denver Dev Meetup yesterday evening on building distributed JavaScript map widgets.

The presentation provided an overview of some techniques, technical considerations, and benefits of using JavaScript widgets (as opposed to iframe widgets).

This was my first attempt at a lighting talk.. seven minutes sure go by fast!

Here are the slides:

Displaying Google Fusion Tables Map Tiles in OpenLayers

March 25th, 2011 Comments off

Just came across a nice jsFiddle example showing how to display map tiles from Google Fusion Tables in OpenLayers.

Full example at: http://jsfiddle.net/UAxun/155/

Using Google Closure Compiler with OpenLayers

February 8th, 2011 Comments off

We have integrated Google Closure Compiler into our OpenLayers build scripts and we are getting 22% more compression over jsmin when using the Closure Compiler SIMPLE_OPTIMIZATIONS compilation level.

OpenLayers is not written to support the ADVANCED_OPTIMIZATIONS level but works great with SIMPLE_OPTIMIZATIONS.

We are calling the Closure Compiler Service API from a Python script and we are running OpenLayers through jsmin first to reduce the request size before sending the request up to Google.

Note that the service API only supports requests up to 1000KB so you will need to customize your OpenLayers build to remove the parts you don’t use first.  In our case we were able to reduce the before-minified size by almost 60%.

Here is the python module we are calling from the main OpenLayers build script:

#!/usr/bin/python
import httplib, urllib, sys
from StringIO import StringIO

def compile(input):

    # Define the parameters for the POST request and encode them in
    # a URL-safe format.    
    params = urllib.urlencode([
        ('js_code', input),
        ('compilation_level', 'SIMPLE_OPTIMIZATIONS'),
        ('output_format', 'text'),
        ('output_info', 'compiled_code'),
      ])

    # Always use the following value for the Content-type header.
    headers = { "Content-type": "application/x-www-form-urlencoded" }
    conn = httplib.HTTPConnection('closure-compiler.appspot.com')
    conn.request('POST', '/compile', params, headers)
    response = conn.getresponse()
    data = response.read()
    conn.close
    return data

Control OpenLayers FramedCloud Popup Position

October 20th, 2010 8 comments

By default, the OpenLayers FramedCloud popup will open in one of four positions (top-left, bottom-left, top-right, bottom-right) to best fit the popup on the screen.  

I wanted to find a way to force the popup to always open to the top-right but I couldn’t find anything in the API that directly allows you to set this.

The fixedRelativePosition attribute allows you to specify that a custom popup you have created only opens in one position but setting this property to false on the out-of-the-box FramedCloud popup doesn’t have any effect.

The solution I found was to override the calculateRelativePostion method that is inherited from the OpenLayers.Popup.Anchored class as follows:

// Create the popup
var popup = new OpenLayers.Popup.FramedCloud("popup",
    feature.geometry.getBounds().getCenterLonLat(),
    new OpenLayers.Size(100, 100),
    "popup contents",
    null, true, onPopupClose);

// Force the popup to always open to the top-right
popup.calculateRelativePosition = function () {
    return 'tr';
}

The FramedCloud popup supports panMapIfOutOfView so the map will automatically pan to ensure that popup is displayed within the extent of the view frame.

The Geospatial Revolution Project

September 29th, 2010 Comments off

The Geospatial Revolution Project is publishing a series of video episodes that provide an excellent overview of digital mapping and location-based technologies and their impact on the way we interact with our world.

The first episode is currently online and future episodes will be posted over the next 6 months.

More info at http://geospatialrevolution.psu.edu/.

Categories: GIS Tags: , ,