Tag Archive for 'SVG'

Heating up SVG

Last week I came over Raphaël, a great JavaScript library for vector graphics visualizations, and I started playing around with maps and SVG again. Long time no see!

To bring some map content from ArcMap to Raphaël I used the VBA Macro I wrote 4 years ago in ArcMap. It still does the job and gives me clean vector graphics the way I want them. I couldn’t find a decent SVG export option for QGIS, although there are some efforts to improve that kind of functionality.

AsSVG, a Python geoprocessing script for ArcGIS is pretty good too. It provides some nice export options, such as pick style and data attribute fields, and I actually ended up using it a lot.

However, it’s 2009 and there are other ways available for sharing code then just providing a plain text file. So I ended up wrapping a bitbucket repository around it. Just in case if somebody is interested in working on or improving the script…

SVG on the iPhone

Mr Timoney pointed my attention to possible SVG support brought with the latest iPhone OS 2.1 update. Unfortunately I sold my iPod touch on eBay last week – got a brand new Nokia E71 instead and am totally happy with it. So I couldn’t verify or test SVG on the iPhone Safari myself and had to ask somebody for help. Richard was kind enough to quickly try and access a SVG site on his iPod touch and send me a screen shot.

Guess what, it works!

SVG is supposed to be the flash killer since its first appearance, and never really succeeded as we know very well. SVG is still a good choice for mapping applications in my opinion, for light-weighted thematic web mapping applications to be more precise. Vector graphics handled by an AJAX front-end, used to visualize statistical attribute data provide a user-friendly interface and are usually easy to develop. Mapping APIs like Google Maps or Open Layers support and use SVG. Web browsers like Firefox and Safari for instance natively support SVG elements, no “but you need an extra plugin discussion” anymore. There is good portion of potential users for SVG based mapping applications.

Anyways, the odd thing with the iPhone and SVG is now, that a quite popular and hyped platform supports SVG but doesn’t play Flash. That’s maybe the time SVG developers have waited for.

I haven’t had the chance yet to play with SVG on the iPhone by myself. But I’m curious how far SVG support goes, what functionality is possible and how the iPhone’s multi-touch gestures can be used in mapping applications. Maybe somebody else can offer more insights on that. I’m not expecting our clients moving to the iPhone, but I would like to see if our simple mapping applications work on the iPhone or can be easily ported to suit the iPhone dimensions – should be easy with *Scalable* Vector Graphics though. However, accessing interactive maps and dig into some regional data while being in meetings or on the way could be a valuable option sometimes.

Cynthia Says “no”

A discussion yesterday made me think of how you can possibly prepare a mapping site to fulfill WAI standards.

Naturally any map produced by a map server comes as image. So the focus on improving accessibility on a mapping site will be to make images better accessible. One step is to improve map graphics and visualization such as contrast, color saturation, color scheme, strokes, etc., something cartographers are well aware about.

In addition to graphic qualities, another WAI requirement is to provide text equivalents for any non-text element, such as images are. A descriptive list, containing the main map elements like places, roads, rivers, mountains, etc. or even a statistical layers could be given as alternative output easily from any map server I’d suppose.

A more advanced solution would be an intelligent textual map output. Not only listing map elements but describing topography, relations among map elements and thematic layers. As if you would give an interpretation of the map to somebody else.

A quick research regarding mapping and accessibility didn’t lead me to much information. Besides, every mapping site I tried, failed Cynthia really badly (even this simple text-based site btw, maybe I should switch templates).

I know, SVG always has been the next big thing and never really took off, but in terms of web accessibility and mapping it offers the important ‘desc’ element:

Each container element or graphics element in an SVG drawing can supply a ‘desc’ and/or a ‘title’ description string where the description is text-only.

The ‘desc’ element basically allows you to provide textual information attached to every map element and deploy that way an (hidden) alternative textual map in addition to every map image. Clearly a major advantage of SVG over raster graphics regarding web accessibility.

More SVG in gecko 1.9

After being the next big thing for more than 5 years now, native SVG support in Firefox 3 gets a major update. Read Tim Rowley’s post for more information. Guess I have to try the Gran Paradiso Alpha 1 as well…

Quick and dirty SVG

What I certainly do love about SVG is the fact that you can put nice looking interactive maps in a very simple and quick way together.

Today I wrote this small SVG map module (in German language and just a small part of an information system) and set it on top of a database containing various regional indicators. Main purpose of the database is to arrange user-defined indicators to customized tables together. The map is kind of a little bonus addition and should help to get a better picture about spatial distribution of certain indicators.

But the point is that this can be done in a day without the need of setting up and configuring a mapserver or web-GIS. Developing 2 or 3 days longer there even would be some more layers, features, colors, etc. and perhaps a cleaner coding style.

Especially when it comes to thematic maps, SVG is IMHO the best choice. Whenever you want to change some thresholds in your legend, or load some new statistical data into your existing regional units, a mapserver has to refresh the whole image. It’s pretty annoying compared to SVG which lets you simply load or reclassify data on-the-fly without the need of reloading any element of the user interface – AJAX, to name a buzzword.

Of course, since most of the work is done on the client-side, map performance is limited there and not on the server-side. But if you look at office machines running at 3GHz, this shouldn’t cause too much headache.

However, SVG enables simple and straight interfaces. Many of our clients get confused by most mapserver interfaces and highly appreciate those simple systems. That’s why we were asked for an easy solution this time. Just to quickly view some regional indicators on the map, without any fancy features.

Drawing charts

Spicing up your tabular data with some charts and graphs is always a good idea. It helps your users reading and understanding your data better and makes your information system look a bit nicer.

Most systems are judged on the visual impression of their front-end, no matter how strong and complex your database concept might be. So never forget to polish the user interface a bit up before releasing it. Just have a look at some software reviews in Apple forums and you know what I’m talking about.

However, nice designed charts help users to quickly understand what the data is about, you know, a picture is worth a thousand words.

Searching for libraries to dynamically draw charts I came over PlotKit. It looks very interesting and I’ll definitely have a second closer look at it. What I’m wondering is, if you could modify PlotKit in order the get some nice thematic SVG maps drawn. Easy and quick interactive online maps, good usability and no need of setting up an entire mapserver environment.

Since thematic maps basically are sort of charts, graphical elements representing data, it should be possible. Well, I’ll see…

Draw SVG polygons on Google Maps

Apparently Google has become a bit lazy in updating their API reference. Thanks to people like Mike Williams who give Google a hand and document for the rest of us interesting new features found in the Google Maps API.

Similar to GPolyline, the new GPolygon class, which comes with API v2.69, enables drawing of SVG polygons onto your Google Maps. Two additional parameters define polygon fill color and opacity:

GPolygon(points, border-color?, border-weight?, border-opacity?, fill-color?, fill-opacity?)

See a live example of the new polygon class here. [via gis-news]

SVG diagrams on Google Maps

A smart swiss Google Maps user posted an interesting example where SVG diagrams are added as overlay to a Google Map.

Very clever!

Though the diagrams are static and don’t make sense, it should be easy to connect them to dynamic data. The example demonstrates a promising method of overlaying vector symbols and point signatures on Google Maps, only based on a few lines of Javascript.

Compared to raster graphic symbols, e.g. PNGs or JPGs, any SVG symbol attribute like color, size, transparency, etc. can be changed easily on-the-fly, without the need of producing and storing tons of new files somewhere in the server-background.

The example doesn’t work with Adobe’s SVG Plugin, it’s only accessible with Firefox so far.

Where 2.0 day #2

Where 2.0: Patrick HoganThere are dozens of posts out there that cover very well the second day and all the talks of Where 2.0. So I’ll briefly sketch my personal highlights of today (as I did yesterday):

I really got impressed by the effort of NASA’s World Wind team to improve their product and their enthusiasm behind all their work. From an EULA point of view it’s quite clear that in a professional environment NASA’s World Wind is the only option to go (by now) if one would like to use globe applications:

  • World wind has no use restriction,
  • it’s 100% open source software,
  • extendable due to their add-ons,
  • direct integration of WMS (and soon WFS),
  • supports GIS file formats like ESRI shapefiles.

Once the place names can be accessed via WFS and don’t have to be packed into the application itself, the download size (60 MB at the moment) will significantly decrease to probably only a few megabytes.
Support for more platforms should be achieved in fall 2006 as World Wind is currently ported to Java. Well, not only ported but reprogrammed as far as I understood today.

Apparently, for Autodesk did the concept of Open Source make sense, as they claimed that the revenue is made in other segments of the mapserver market than selling server software and they could meet user needs better by adopting Open Source development cycles for parts of their product portfolio.

There were only a few GIS talks at Where 2.0, but they made me wanna try some of the shown tools like OSSIM and GRASS (well, GRASS I tried once but had not the time to dig deep enough into it).

Pretty funny was the presentation of Donald Cooke from TeleAtlas! I definitely will get a copy of “Fun with GPS“.

Mr Jack Dangermond demonstrated the strategy of ESRI products: author, serve and publish. The audience saw a demo of ArcGIS Explorer (incl. Jabber chat), how data is edited in ArcGIS Desktop and published as WMS on the server. Quite impressing was the demo of ArcWeb SVG Map Viewer, which illustrated with a view clicks the power of the-next-big-thing-since-5-years SVG by changing to various projections, applying different styles and switching layers on/off without reloading (no, not even asynchronous!) anything. To me it became quite clear the ESRI isn’t heading at all into this Where 2.0 market, they clearly stick to their professional GIS business and concentrate in providing the technology to enable the back-end for services like Google maps (I don’t know if Google maps is using any ESRI technology at all…).

Check out this excellent Where 2.0 photoset at Flickr (btw, wasn’t Stewart Butterfield on the speakers list?) and the roundup written by the Where 2.0 co-chairs.

See you next year at Where 2.0, 19.6-20.6.2007, Fairmont Hotel, San Jose, CA.

Windows Live SVG Local

Windows Live SVG LocalJeff Schiller found out that driving directions are drawn using SVG in Windows Live Local. Interesting and great to see but it leads me to one question: what happened to Microsoft’s VML? Are they dropping (or not any longer forcing) their own technology in favor of an open standard?

Btw, I never had a closer look at Windows Live Local (they should probably flag their product announcements with “works now outside of IE too!”, I’m not even trying to access their services without IE anymore because of too bad experiences in the past) and I must admit that I’m pretty surprised. From a cartographic point of view the maps are looking very nice. In my opinion the map design is much better than in the rest of those search engine mapping services. Aren’t they all using the same or similar sources such as Digital Globe, NAVTEQ, TeleAtlas etc.?

Microsoft offers a lot features within Live Local:

  • of course a search for addresses and businesses,
  • driving directions,
  • it shows you traffic information,
  • you can mark places, add them to collections and if you’re a registered MSN user you can save and share them (features known from Platial?),
  • and not to forget the famous birds eye view.

Features are good, basically. Too many features are bad. I’m afraid if too many marketing champions get involved in the development of Windows Live Local they will kill the service by a feature overkill. The options I have on the site are already quite versatile. They reach from searching an address, marking and sharing places to visualize traffic information.

I still prefer the “keep it simple” design principle. The worst question a user can ask or think about while accessing your site is: “What can I do here?”. The very basic service or aim of your site must be clear from the beginning. If it’s hidden inside a forest of features then you are having a problem.