Differences between revisions 5 and 6
Revision 5 as of 2011-08-17 08:06:39
Size: 4168
Editor: SamatJain
Comment: Example XAPI queries
Revision 6 as of 2011-09-29 21:46:10
Size: 4363
Editor: SamatJain
Comment:
Deletions are marked like this. Additions are marked like this.
Line 134: Line 134:

== Misc links ==

 * [[http://mapserver.org/input/raster.html#rasters-and-tile-indexing|Raster Data — MapServer 6.0.1 documentation]]: Creating tile indexes for raster images (e.g. MrSID)

XAPI

I can never remember how to use XAPI. Here are some example queries:

Cafes in part of the Las Cruces area:

All addresses with area code of 88011:

Fetch information for a single node:

Aerial photography

The National Park Service has a data clearing house for New Mexico national park GIS information, including DOQs for various national park-containing areas of New Mexico (including White Sands National Monument). The DOQs are in MrSID format.

NAIP imagery with Mapserver, tilecache, and JOSM

USGS

The USGS has made available their NAIP tile server. From Eric Wolf:

I want to see what happens to our server if we start opening up more. So, at
least until y'all's traffic hinders our project, here's a URL for a
Potlatch-style tilecache of NAIP. The cache is not pre-seeded:

Potlatch 1:
http://navigator.er.usgs.gov/naip/tilecache.cgi/1.0.0/0/!/!/!

Potlatch 2:
http://navigator.er.usgs.gov/naip/tilecache.cgi/1.0.0/0/$z/$x/$y

This is caching the National Map Large Scale Imagery WMS layer:

http://raster.nationalmap.gov/ArcGIS/rest/services/Combined/TNM_Large_Scale_Imagery/MapServer

(WMS GetCapabilities link is at the bottom of that page).

NOTICE: I personally make no warranties as to how long this will run or it's
capabilties. More significantly, the USGS is not offering this as any kind
of regular service. Feel free to hit it while others are populating their
cache. Given that this is running on a cast-off server in Rolla, Missouri,
don't expect too great a performance.

MapServer

UNM MapServer is needed to reproject from EPSG:4326 to EPSG:900913 (Google Mercator) projection.

MAP
    SIZE 256 256
    TRANSPARENT TRUE
    OUTPUTFORMAT
      NAME PNG
      DRIVER 'GD/PNG'
      MIMETYPE 'image/png'
      IMAGEMODE RGBA
      EXTENSION "png"
      TRANSPARENT ON
      FORMATOPTION "INTERLACE=OFF"
    END
    WEB
      IMAGEPATH "/var/run/mapserv"
      METADATA
        wms_srs "epsg:4326 epsg:900913"
      END
      TEMPLATE "/path/to/web_template.html"
    END
    STATUS ON

    PROJECTION
        "init=epsg:900913"
    END

    LAYER
        NAME 'naip1m'
        TYPE RASTER
        STATUS DEFAULT
        CONNECTION "http://isse.cr.usgs.gov/ArcGIS/services/Combined/USGS_EDC_Ortho_NAIP/MapServer/WMSServer?"
        CONNECTIONTYPE WMS
        PROJECTION
            "init=epsg:4326"
        END
        METADATA
            "wms_name"              "0"
            "wms_server_version"    "1.1.1"
            "wms_format"            "image/jpeg"
        END
    END
END

tilecache

tilecache takes converts TMS requests (made by Mercartor, JOSM, Potlatch) and turns them into WMS requests, serviced by the custom Mapserver instance we setup above.

[naip]
type=WMS
url=http://hypercube.telascience.org/cgi-bin/mapserv?map=/home/iandees/mapserver/naip.map&
extension=png 
layers=naip1m
bbox=-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892
srs=EPSG:900913
metatile=yes
levels=20
tms_type=google

JOSM

[22:33:24] <iandees_> so if you open up ~/.josm/preferences and add the following two lines:

slippymap.custom_tile_source_1.name=NAIP
slippymap.custom_tile_source_1.url=http://hypercube.telascience.org/tiles/1.0.0/naip/

Another test server: http://cube.telascience.org/osm/oltest.html?zoom=13&lat=44.9704&lon=-93.28579&layers=B0000T, that'd be configured:

slippymap.custom_tile_source_1.name=NAIP
slippymap.custom_tile_source_1.url=http://cube.telascience.org:8000/naip/

SamatsWiki: OpenStreetMap (last edited 2012-08-07 09:20:09 by SamatJain)