Sat, 25 Feb 2006

World Wind and shapefiles

How should NASA's World Wind handle the introduction of a shapefile layer? Well, I can think of two reasonable ways to do this.

  1. somewhere there exists a .zip file containing the three component files of the shapefile. A third party has written an XML which describes how they want that shapefile drawn (e.g. with and without labels). Their XML file specifies the URL of the shapefile.
  2. somebody wants to publish a shapefile directly usable by WW. They create the .zip with the three shapefile files, and add to it the .xml needed by WW.

    I can think of only one benefit to #2: you don't have to deal with telling your webserver that a .xml file is an XML file rather than some kind of mutant HTML. A big advantage of #1 is that anybody can describe anybody else's file for use in WW, *and* they don't have to host that shapefile.

    We could support both formats, of course. If you tell WW to use a shapefile, WW could look at the filetype / extension. If it's XML, then the XML specifies the shapefile with a URL. If it's .zip, then the .zip contains the XML file.

    Now, the second question is how to handle versions. Is there any reason to keep permanently a shapefile given that WW doesn't permanently keep any imagery data? Basically, WW is an online data viewer and only caches imagery data. Why should it save a shapefile? Thus, whenever you turn on a shapefile, WW should re-fetch the shapefile (checking the HEAD just as a web browser does). If somebody *really* wants to display local data, they can specify file:// as the URL.

Posted [22:14] [Filed in: gis] [permalink] [Google for the title] [digg this]
qrcode