Map Tiles

Table of Contents

Background

Digital orthophotography (orthos) for NYC has been captured on a biennial basis since 2004. Prior to that there were two ad-hoc captures starting with 1996. The orthos have evolved over the years from 1-foot pixel resolution, with selective true ortho, to 6-inch pixel resolution with full true orthos. These image data sets, along with additional aerial photography captured prior to 1996, are being made publicly available as described below. Click here further details on the aerial and orthophotography data.

Beginning in 2004 planimetric data (i.e., geographic features captured from aerial survey) has been extracted from the orthos every-other ortho capture (i.e., every four years). Although the planimetric data sets are already available on the NYC OpenData Portal, a map service is being made available to extend and simplify usage of the data as described below. Click here for further details on the planimetric data.

License

CC-BY License
Each of these map tile sets are © City of New York, licensed for reuse under the Creative Commons Attribution (CC BY 4.0) license.

Tile Map Service

Service Description: https://api.nyc.gov/geoserver/gwc/service/tms/1.0.0/?Key=<your-api-key>

The GIS team at NYC's Department of Information Technology has published a new Open Source Geospatial Foundation standard Tile Map Service (TMS) using GeoServer and GeoWebCache from Boundless. The TMS serves multiple tiled maps, in the Web Mercator projection, (EPSG:3857) compatible with most JavaScript web mapping libraries such as OpenLayers, MapBox, Leaflet, and even ArcGIS.

Note: Basemap tiles containing changing features based on NYC street centerline and building data will be updated on a quarterly basis.

Basemap Tile Layers (TMS)

Aerial Photography Tile Layers (TMS)

Web Map Tile Service (WMTS)

Get Capabilities: https://api.nyc.gov/geoserver/gwc/service/wmts/?REQUEST=GetCapabilities&Key=<your-api-key>

The GIS team at NYC's Department of Information Technology has published a new Open Geospatial Consortium standard Web Map Tile Service (WMTS) using GeoServer and GeoWebCache from Boundless. The TMS serves multiple tiled maps, in the Web Mercator projection, (EPSG:3857) compatible with most JavaScript web mapping libraries such as OpenLayers, MapBox, Leaflet, and even ArcGIS.

Note: Basemap tiles containing changing features based on NYC street centerline and building data will be updated on a quarterly basis.

Basemap Tile Layers (WMTS)

Aerial Photography Tile Layers (WMTS)

Javascript How To

Below are some basic examples that show how to use the NYC Map Tiles in a web page. Please note the extent limits placed on the layers. These limits will prevent your application from making spurious tile requests for areas outside of extent of the NYC data which could slow down your map rendering.

OpenLayers (TMS)

import View from 'ol/View'; import XYZ from 'ol/source/XYZ'; import Layer from 'ol/layer/Tile'; const key = '<your-api-key>'; const view = new View({ center: [-8235252, 4969073], minZoom: 8, maxZoom: 19, zoom: 10 }); const baseLayer = new Layer({ extent: [-8453323, 4774561, -7983695, 5165920], source: new XYZ({ url: `https://api.nyc.gov/geoserver/gwc/service/tms/1.0.0/carto%3Abasemap%3A3857@jpeg/{z}/{x}/{-y}.jpg?Key=${key}` }) }); const labelLayer = new Layer({ extent: [-8268000, 4870900, -8005000, 5055500], source: new XYZ({ url: `https://api.nyc.gov/geoserver/gwc/service/tms/1.0.0/carto%3Alabel%3A3857@jpeg/{z}/{x}/{-y}.png8?Key=${key}` }) }); const map = new ol.Map({ target: 'map', /* The id of the DOM element that will contain the map */ view: view, layers: [baseLayer, labelLayer] });

View the OpenLayers TMS map...

OpenLayers (WMTS)

import View from 'ol/View'; import WMTSCapabilities from 'ol/format/WMTSCapabilities'; import {optionsFromCapabilities} from 'ol/format/WMTSCapabilities'; import TileLayer from 'ol/layer/Tile'; import SourceWMTS from 'ol/source/WMTS'; import Map from 'ol/Map'; const key = '<your-api-key>'; const view = new View({ center: [-8235252, 4969073], minZoom: 8, maxZoom: 19, zoom: 10 }); const parser = new WMTSCapabilities(); const tileLoadFunction = (imageTile, src) => { imageTile.getImage().src = `${src}&Key=${key}`; }; fetch(`https://api.nyc.gov/geoserver/gwc/service/wmts/?REQUEST=GetCapabilities&Key=${key}`).then(response => { return response.text(); }).then(text => { const result = parser.read(text); const baseOptions = optionsFromCapabilities(result, { layer: 'carto:basemap', matrixSet: 'EPSG:900913' }); const labelOptions = optionsFromCapabilities(result, { layer: 'carto:label', matrixSet: 'EPSG:900913' }); const baseLayer = new TileLayer({ source: new SourceWMTS(baseOptions) }); const labelLayer = TileLayer({ source: new oSourceWMTS(labelOptions) }); map = new Map({ target: 'map', /* The id of the DOM element that will contain the map */ view: view, layers: [baseLayer, labelLayer] }); });

View the OpenLayers WMTS map...

Desktop How To

QGIS

  1. Download and install QGIS from https://www.qgis.org/download/
  2. Open QGIS
  3. Proxy settings (if applicable)
  4. Click the Plugins menu and choose Manage and Install Plugins...
  5. Click the All icon in the left panel of the Plugins dialog
  6. Enter TileLayer Plugin in the Search field
  7. Choose the TileLayer Plugin in the center panel of the Plugins dialog
  8. Click the Install plugin button to install the TileLayer Plugin
  9. Click the Close button on the dialog
  10. Download nyc.tsv to a folder on your PC
  11. Click the Web menu and choose TileLayerPlugin and then choose Add Tile Layer
  12. Click the Settings button in the Add tile layer dialog
  13. Enter the path to the folder containing the nyc.tsv file in the External layer definition directory field of the TileLayerPlugin Settings dialog
  14. Click the OK button to close the dialog and save your settings
  15. Choose a TMS service from the nyc list
  16. Click the Add button

ArcMap

  1. Open Catalog in ArcMap
  2. Expand the GIS Servers section
  3. Double-click the Add WMTS Server choice to open the Add WMTS Server dialog
  4. Enter https://api.nyc.gov/geoserver/gwc/service/wmts/?REQUEST=GetCapabilities&Key=<your-api-key> into the URL field of the Add WMTS Server dialog
  5. Click the Get Layer button
  6. Click the Ok button to in the Add WMTS Server dialog
  7. In the GIS Servers section of Catalog there will now be a Web Map Tile Service - GeoWebCache on api.nyc.gov choice
  8. Expand the Web Map Tile Service - GeoWebCache on api.nyc.gov choice and drag a layer into the Table of Contents