├── vendor ├── terraformer-arcgis-parser │ ├── .npmingnore │ ├── .gitignore │ ├── .bower.json │ ├── terraformer-arcgis-parser.min.js │ └── terraformer-arcgis-parser.js └── terraformer │ ├── .npmignore │ ├── .travis.yml │ ├── .bower.json │ ├── .gitignore │ ├── terraformer.min.js │ └── terraformer.js ├── license.txt ├── geojson-layer-js.png ├── CONTRIBUTING.md ├── README.md ├── geojsonlayer.html ├── data ├── usa.json ├── canada.json └── dc-schools.json └── src └── geojsonlayer.js /vendor/terraformer-arcgis-parser/.npmingnore: -------------------------------------------------------------------------------- 1 | versions -------------------------------------------------------------------------------- /vendor/terraformer/.npmignore: -------------------------------------------------------------------------------- 1 | examples 2 | versions 3 | source 4 | out 5 | docs -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/geojson-layer-js/HEAD/license.txt -------------------------------------------------------------------------------- /geojson-layer-js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/geojson-layer-js/HEAD/geojson-layer-js.png -------------------------------------------------------------------------------- /vendor/terraformer/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | - "0.10" 5 | - "0.8" -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing). 2 | -------------------------------------------------------------------------------- /vendor/terraformer-arcgis-parser/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore complexity output 2 | complexity.xml 3 | 4 | # Ignore Coverage output 5 | coverage 6 | 7 | # Ignore Grunt temp files 8 | .grunt 9 | 10 | # Mac 11 | .DS_Store 12 | Icon 13 | ._* 14 | .Spotlight-V100 15 | # SublimeText 16 | /*.sublime-project 17 | *.sublime-workspace 18 | 19 | #Node 20 | node_modules 21 | npm-debug.log -------------------------------------------------------------------------------- /vendor/terraformer/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "terraformer", 3 | "version": "1.0.3", 4 | "main": "terraformer.min.js", 5 | "ignore": [ 6 | "docs", 7 | "examples", 8 | "spec", 9 | "versions", 10 | "source", 11 | "Gemfile", 12 | "config.rb" 13 | ], 14 | "homepage": "https://github.com/Esri/Terraformer", 15 | "_release": "1.0.3", 16 | "_resolution": { 17 | "type": "version", 18 | "tag": "v1.0.3", 19 | "commit": "cc459746715e4b199dc1b8c71610eb8840d8e1fe" 20 | }, 21 | "_source": "git://github.com/Esri/Terraformer.git", 22 | "_target": "~1.0.3", 23 | "_originalSource": "terraformer", 24 | "_direct": true 25 | } -------------------------------------------------------------------------------- /vendor/terraformer-arcgis-parser/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "terraformer-arcgis-parser", 3 | "version": "1.0.4", 4 | "main": "terraformer-arcgis-parser.min.js", 5 | "ignore": [ 6 | "versions", 7 | "benchmarks" 8 | ], 9 | "dependencies": { 10 | "terraformer": "~1.0.3" 11 | }, 12 | "homepage": "https://github.com/Esri/terraformer-arcgis-parser", 13 | "_release": "1.0.4", 14 | "_resolution": { 15 | "type": "version", 16 | "tag": "v1.0.4", 17 | "commit": "fb13001a49136be04885ba4805a13fb9afd9629a" 18 | }, 19 | "_source": "git://github.com/Esri/terraformer-arcgis-parser.git", 20 | "_target": "~1.0.4", 21 | "_originalSource": "terraformer-arcgis-parser", 22 | "_direct": true 23 | } -------------------------------------------------------------------------------- /vendor/terraformer/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore complexity output 2 | complexity.xml 3 | 4 | # Ignore Coverage output 5 | .coverage 6 | 7 | # Ignore Grunt temp files 8 | .grunt 9 | 10 | # Ignore environment variables set on this machine 11 | .env 12 | 13 | # Ignore the doc output 14 | docs-build 15 | 16 | # Mac 17 | .DS_Store 18 | Icon 19 | ._* 20 | .Spotlight-V100 21 | # SublimeText 22 | /*.sublime-project 23 | *.sublime-workspace 24 | 25 | # SASS 26 | .sass-cache 27 | 28 | #Node 29 | node_modules 30 | 31 | #anvil 32 | /index.html 33 | 34 | # Ruby 35 | *.gem 36 | *.rbc 37 | .bundle 38 | .config 39 | coverage 40 | InstalledFiles 41 | lib/bundler/man 42 | pkg 43 | rdoc 44 | spec/reports 45 | test/tmp 46 | test/version_tmp 47 | tmp 48 | Gemfile.lock 49 | 50 | # YARD artifacts 51 | .yardoc 52 | _yardoc 53 | doc/ 54 | -------------------------------------------------------------------------------- /vendor/terraformer-arcgis-parser/terraformer-arcgis-parser.min.js: -------------------------------------------------------------------------------- 1 | /*! Terraformer ArcGIS Parser - 1.0.4 - 2014-06-17 2 | * https://github.com/esri/terraformer-arcgis-parser 3 | * Copyright (c) 2014 Esri, Inc. 4 | * Licensed MIT */!function(a,b){if("object"==typeof module&&"object"==typeof module.exports&&(exports=module.exports=b(require("terraformer"))),"object"==typeof a.navigator){if(!a.Terraformer)throw new Error("Terraformer.ArcGIS requires the core Terraformer library. https://github.com/esri/Terraformer");a.Terraformer.ArcGIS=b(a.Terraformer)}}(this,function(a){function b(a){var b,c,d,e,f=0,g=0,h=[];d=a.match(/((\+|\-)[^\+\-]+)/g),e=parseInt(d[0],32);for(var i=1;id;d++)b=a[d+1],c+=(b[0]-f[0])*(b[1]+f[1]),f=b;return c>=0}function g(a){var b=[],d=a.slice(0),e=c(d.shift().slice(0));if(e.length>=4){f(e)||e.reverse(),b.push(e);for(var g=0;g=4&&(f(h)&&h.reverse(),b.push(h))}}return b}function h(a){for(var b=[],c=0;c=0;e--){var f=d[e].slice(0);b.push(f)}return b}function i(b,c){var d=a.Tools.arraysIntersectArrays(b,c),e=a.Tools.coordinatesContainPoint(b,c[0]);return!d&&e?!0:!1}function j(a){for(var b=[],d=[],e=0;e=0;l--){var m=b[l][0];if(i(m,j)){b[l].push(j),k=!0;break}}k||b.push([j.reverse()])}return 1===b.length?{type:"Polygon",coordinates:b[0]}:{type:"MultiPolygon",coordinates:b}}function k(c,d){var f={};d=d||{},d.idAttribute=d.idAttribute||void 0,"number"==typeof c.x&&"number"==typeof c.y&&(f.type="Point",f.coordinates=[c.x,c.y],(c.z||c.m)&&f.coordinates.push(c.z),c.m&&f.coordinates.push(c.m)),c.points&&(f.type="MultiPoint",f.coordinates=c.points.slice(0)),c.paths&&(1===c.paths.length?(f.type="LineString",f.coordinates=c.paths[0].slice(0)):(f.type="MultiLineString",f.coordinates=c.paths.slice(0))),c.rings&&(f=j(c.rings.slice(0))),(c.compressedGeometry||c.geometry||c.attributes)&&(f.type="Feature",c.compressedGeometry&&(c.geometry={paths:[b(c.compressedGeometry)]}),f.geometry=c.geometry?k(c.geometry):null,f.properties=c.attributes?e(c.attributes):null,c.attributes&&(f.id=c.attributes[d.idAttribute]||c.attributes.OBJECTID||c.attributes.FID));var g=c.geometry?c.geometry.spatialReference:c.spatialReference;return g&&102100===g.wkid&&(f=a.toGeographic(f)),new a.Primitive(f)}function l(b,c){var d;c=c||{};var f=c.idAttribute||"OBJECTID";d=c.sr?{wkid:c.sr}:b&&b.crs===a.MercatorCRS?{wkid:102100}:{wkid:4326};var i,j={};switch(b.type){case"Point":j.x=b.coordinates[0],j.y=b.coordinates[1],b.coordinates[2]&&(j.z=b.coordinates[2]),b.coordinates[3]&&(j.m=b.coordinates[3]),j.spatialReference=d;break;case"MultiPoint":j.points=b.coordinates.slice(0),j.spatialReference=d;break;case"LineString":j.paths=[b.coordinates.slice(0)],j.spatialReference=d;break;case"MultiLineString":j.paths=b.coordinates.slice(0),j.spatialReference=d;break;case"Polygon":j.rings=g(b.coordinates.slice(0)),j.spatialReference=d;break;case"MultiPolygon":j.rings=h(b.coordinates.slice(0)),j.spatialReference=d;break;case"Feature":b.geometry&&(j.geometry=l(b.geometry,c)),j.attributes=b.properties?e(b.properties):{},j.attributes[f]=b.id;break;case"FeatureCollection":for(j=[],i=0;i NOTE: The ArcGIS API for JavaScript 4 now supports a native [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html). Please use [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html) moving forward. 4 | 5 | An easy way to load GeoJSON resources into your [ArcGIS](https://developers.arcgis.com/javascript/) map. This is a simple custom layer that uses [Terraformer](http://terraformer.io) to convert GeoJSON to ArcGIS JSON. It "should" support all GraphicLayer operations. e.g. popups, rendering... 6 | 7 | [View demo app live](http://esri.github.io/geojson-layer-js/geojsonlayer.html) 8 | 9 | ![App](https://raw.github.com/Esri/geojson-layer-js/master/geojson-layer-js.png) 10 | 11 | ## Features 12 | * Load GeoJSON from a file 13 | * Load GeoJSON from a server 14 | * Load GeoJSON data from a FeatureCollection 15 | 16 | ## Usage 17 | ``` JavaScript 18 | // Example 1: Load from a file 19 | var geoJsonLayer1 = new GeoJsonLayer({ 20 | url: "http://www.myCorsEnabledServer.com/canada.json" 21 | }); 22 | 23 | // Example 2: Load from a server 24 | var geoJsonLayer2 = new GeoJsonLayer({ 25 | url: "http://opendata.dc.gov/datasets/81a9d9885947483aa2088d81b20bfe66_5.geojson" 26 | }); 27 | 28 | // Example 3: Load from a FeatureCollection 29 | var geoJsonLayer3 = new GeoJsonLayer({ 30 | data: myFeatureCollection 31 | }); 32 | 33 | // Add to map 34 | map.addLayer(geoJsonLayer1); 35 | map.addLayer(geoJsonLayer2); 36 | map.addLayer(geoJsonLayer3); 37 | ``` 38 | 39 | ``` JavaScript 40 | // options: 41 | // url: String 42 | // Path to file or server endpoint. Server must be on the same domain or cors enabled. Or use a proxy. 43 | // data: Object[] 44 | // Optional: FeatureCollection of GeoJson features. This will override url if both are provided. 45 | // maxdraw: Number 46 | // Optional: Limit the maximum graphics to draw. Default is 1000. 47 | ``` 48 | 49 | ## Developer Notes 50 | * All GeoJSON data needs to be in geographic coordinates [(wkid 4326)](https://developers.arcgis.com/javascript/jsapi/spatialreference-amd.html). 51 | * All GeoJSON resources must reside on the same domain as the app unless a [CORS enabled server](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html) or a [proxy](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html) is used. NOTE: GitHub gh-pages servers are not CORS enabled! 52 | * Terraformer does not support dojo require() and must be loaded directly into the page. 53 | 54 | ``` HTML 55 | 56 | 57 | 58 | ``` 59 | 60 | ## Example 61 | ``` HTML 62 | 63 | 64 | 65 | 66 | 67 | 68 | ArcGIS GeoJSON Layer 69 | 70 | 71 | 72 | 73 | 74 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 122 | 123 | 124 |
125 | 126 | 127 | ``` 128 | 129 | ## Requirements 130 | 131 | * [ArcGIS for JavaScript API](https://developers.arcgis.com/javascript/) 132 | * [Terraformer](http://terraformer.io) 133 | 134 | ## Resources 135 | 136 | * [ArcGIS for JavaScript API Resource Center](https://developers.arcgis.com/javascript/) 137 | * [ArcGIS Blog](http://blogs.esri.com/esri/arcgis/) 138 | * [twitter@esri](http://twitter.com/esri) 139 | 140 | ## Issues 141 | 142 | Find a bug or want to request a new feature? Please let us know by submitting an issue. Thank you! 143 | 144 | ## Contributing 145 | 146 | Anyone and everyone is welcome to contribute. Please see our [guidelines for contributing](https://github.com/esri/contributing). 147 | 148 | ## Licensing 149 | Copyright 2013 Esri 150 | 151 | Licensed under the Apache License, Version 2.0 (the "License"); 152 | you may not use this file except in compliance with the License. 153 | You may obtain a copy of the License at 154 | 155 | http://www.apache.org/licenses/LICENSE-2.0 156 | 157 | Unless required by applicable law or agreed to in writing, software 158 | distributed under the License is distributed on an "AS IS" BASIS, 159 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 160 | See the License for the specific language governing permissions and 161 | limitations under the License. 162 | 163 | A copy of the license is available in the repository's [license.txt]( https://raw.github.com/Esri/geojson-layer-js/master/license.txt) file. 164 | 165 | [](Esri Tags: ArcGIS Web Mapping GeoJSON Layer Terraformer Projections) 166 | [](Esri Language: JavaScript) 167 | -------------------------------------------------------------------------------- /geojsonlayer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ArcGIS GeoJSON Layer 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 125 | 126 | 127 |
128 |
129 |

ArcGIS GeoJSON Layer

130 | 133 |
134 |
135 |

Load GeoJSON into the map as a layer. Terraformer is used to convert GeoJSON to ArcGIS JSON.

136 |
137 |
138 | 139 | 149 |
150 |
151 | 152 |
153 | 154 | 155 | 156 | 157 |
158 |
159 | 160 |
161 | 162 |
163 |
164 |
165 |
166 |
167 | 168 | 169 | -------------------------------------------------------------------------------- /data/usa.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection","features":[ 2 | {"type":"Feature","id":"USA","properties":{"name":"United States of America"},"geometry":{"type":"MultiPolygon","coordinates":[[[[-155.54211,19.08348],[-155.68817,18.91619],[-155.93665,19.05939],[-155.90806,19.33888],[-156.07347,19.70294],[-156.02368,19.81422],[-155.85008,19.97729],[-155.91907,20.17395],[-155.86108,20.26721],[-155.78505,20.2487],[-155.40214,20.07975],[-155.22452,19.99302],[-155.06226,19.8591],[-154.80741,19.50871],[-154.83147,19.45328],[-155.22217,19.23972],[-155.54211,19.08348]]],[[[-156.07926,20.64397],[-156.41445,20.57241],[-156.58673,20.783],[-156.70167,20.8643],[-156.71055,20.92676],[-156.61258,21.01249],[-156.25711,20.91745],[-155.99566,20.76404],[-156.07926,20.64397]]],[[[-156.75824,21.17684],[-156.78933,21.06873],[-157.32521,21.09777],[-157.25027,21.21958],[-156.75824,21.17684]]],[[[-157.65283,21.32217],[-157.70703,21.26442],[-157.7786,21.27729],[-158.12667,21.31244],[-158.2538,21.53919],[-158.29265,21.57912],[-158.0252,21.71696],[-157.94161,21.65272],[-157.65283,21.32217]]],[[[-159.34512,21.982],[-159.46372,21.88299],[-159.80051,22.06533],[-159.74877,22.1382],[-159.5962,22.23618],[-159.36569,22.21494],[-159.34512,21.982]]],[[[-94.81758,49.38905],[-94.64,48.84],[-94.32914,48.67074],[-93.63087,48.60926],[-92.61,48.45],[-91.64,48.14],[-90.83,48.27],[-89.6,48.01],[-89.272917,48.019808],[-88.378114,48.302918],[-87.439793,47.94],[-86.461991,47.553338],[-85.652363,47.220219],[-84.87608,46.900083],[-84.779238,46.637102],[-84.543749,46.538684],[-84.6049,46.4396],[-84.3367,46.40877],[-84.14212,46.512226],[-84.091851,46.275419],[-83.890765,46.116927],[-83.616131,46.116927],[-83.469551,45.994686],[-83.592851,45.816894],[-82.550925,45.347517],[-82.337763,44.44],[-82.137642,43.571088],[-82.43,42.98],[-82.9,42.43],[-83.12,42.08],[-83.142,41.975681],[-83.02981,41.832796],[-82.690089,41.675105],[-82.439278,41.675105],[-81.277747,42.209026],[-80.247448,42.3662],[-78.939362,42.863611],[-78.92,42.965],[-79.01,43.27],[-79.171674,43.466339],[-78.72028,43.625089],[-77.737885,43.629056],[-76.820034,43.628784],[-76.5,44.018459],[-76.375,44.09631],[-75.31821,44.81645],[-74.867,45.00048],[-73.34783,45.00738],[-71.50506,45.0082],[-71.405,45.255],[-71.08482,45.30524],[-70.66,45.46],[-70.305,45.915],[-69.99997,46.69307],[-69.237216,47.447781],[-68.905,47.185],[-68.23444,47.35486],[-67.79046,47.06636],[-67.79134,45.70281],[-67.13741,45.13753],[-66.96466,44.8097],[-68.03252,44.3252],[-69.06,43.98],[-70.11617,43.68405],[-70.645476,43.090238],[-70.81489,42.8653],[-70.825,42.335],[-70.495,41.805],[-70.08,41.78],[-70.185,42.145],[-69.88497,41.92283],[-69.96503,41.63717],[-70.64,41.475],[-71.12039,41.49445],[-71.86,41.32],[-72.295,41.27],[-72.87643,41.22065],[-73.71,40.931102],[-72.24126,41.11948],[-71.945,40.93],[-73.345,40.63],[-73.982,40.628],[-73.952325,40.75075],[-74.25671,40.47351],[-73.96244,40.42763],[-74.17838,39.70926],[-74.90604,38.93954],[-74.98041,39.1964],[-75.20002,39.24845],[-75.52805,39.4985],[-75.32,38.96],[-75.071835,38.782032],[-75.05673,38.40412],[-75.37747,38.01551],[-75.94023,37.21689],[-76.03127,37.2566],[-75.72205,37.93705],[-76.23287,38.319215],[-76.35,39.15],[-76.542725,38.717615],[-76.32933,38.08326],[-76.989998,38.239992],[-76.30162,37.917945],[-76.25874,36.9664],[-75.9718,36.89726],[-75.86804,36.55125],[-75.72749,35.55074],[-76.36318,34.80854],[-77.397635,34.51201],[-78.05496,33.92547],[-78.55435,33.86133],[-79.06067,33.49395],[-79.20357,33.15839],[-80.301325,32.509355],[-80.86498,32.0333],[-81.33629,31.44049],[-81.49042,30.72999],[-81.31371,30.03552],[-80.98,29.18],[-80.535585,28.47213],[-80.53,28.04],[-80.056539,26.88],[-80.088015,26.205765],[-80.13156,25.816775],[-80.38103,25.20616],[-80.68,25.08],[-81.17213,25.20126],[-81.33,25.64],[-81.71,25.87],[-82.24,26.73],[-82.70515,27.49504],[-82.85526,27.88624],[-82.65,28.55],[-82.93,29.1],[-83.70959,29.93656],[-84.1,30.09],[-85.10882,29.63615],[-85.28784,29.68612],[-85.7731,30.15261],[-86.4,30.4],[-87.53036,30.27433],[-88.41782,30.3849],[-89.18049,30.31598],[-89.593831,30.159994],[-89.413735,29.89419],[-89.43,29.48864],[-89.21767,29.29108],[-89.40823,29.15961],[-89.77928,29.30714],[-90.15463,29.11743],[-90.880225,29.148535],[-91.626785,29.677],[-92.49906,29.5523],[-93.22637,29.78375],[-93.84842,29.71363],[-94.69,29.48],[-95.60026,28.73863],[-96.59404,28.30748],[-97.14,27.83],[-97.37,27.38],[-97.38,26.69],[-97.33,26.21],[-97.14,25.87],[-97.53,25.84],[-98.24,26.06],[-99.02,26.37],[-99.3,26.84],[-99.52,27.54],[-100.11,28.11],[-100.45584,28.69612],[-100.9576,29.38071],[-101.6624,29.7793],[-102.48,29.76],[-103.11,28.97],[-103.94,29.27],[-104.45697,29.57196],[-104.70575,30.12173],[-105.03737,30.64402],[-105.63159,31.08383],[-106.1429,31.39995],[-106.50759,31.75452],[-108.24,31.754854],[-108.24194,31.34222],[-109.035,31.34194],[-111.02361,31.33472],[-113.30498,32.03914],[-114.815,32.52528],[-114.72139,32.72083],[-115.99135,32.61239],[-117.12776,32.53534],[-117.295938,33.046225],[-117.944,33.621236],[-118.410602,33.740909],[-118.519895,34.027782],[-119.081,34.078],[-119.438841,34.348477],[-120.36778,34.44711],[-120.62286,34.60855],[-120.74433,35.15686],[-121.71457,36.16153],[-122.54747,37.55176],[-122.51201,37.78339],[-122.95319,38.11371],[-123.7272,38.95166],[-123.86517,39.76699],[-124.39807,40.3132],[-124.17886,41.14202],[-124.2137,41.99964],[-124.53284,42.76599],[-124.14214,43.70838],[-124.020535,44.615895],[-123.89893,45.52341],[-124.079635,46.86475],[-124.39567,47.72017],[-124.68721,48.184433],[-124.566101,48.379715],[-123.12,48.04],[-122.58736,47.096],[-122.34,47.36],[-122.5,48.18],[-122.84,49],[-120,49],[-117.03121,49],[-116.04818,49],[-113,49],[-110.05,49],[-107.05,49],[-104.04826,48.99986],[-100.65,49],[-97.22872,49.0007],[-95.15907,49],[-95.15609,49.38425],[-94.81758,49.38905]]],[[[-153.006314,57.115842],[-154.00509,56.734677],[-154.516403,56.992749],[-154.670993,57.461196],[-153.76278,57.816575],[-153.228729,57.968968],[-152.564791,57.901427],[-152.141147,57.591059],[-153.006314,57.115842]]],[[[-165.579164,59.909987],[-166.19277,59.754441],[-166.848337,59.941406],[-167.455277,60.213069],[-166.467792,60.38417],[-165.67443,60.293607],[-165.579164,59.909987]]],[[[-171.731657,63.782515],[-171.114434,63.592191],[-170.491112,63.694975],[-169.682505,63.431116],[-168.689439,63.297506],[-168.771941,63.188598],[-169.52944,62.976931],[-170.290556,63.194438],[-170.671386,63.375822],[-171.553063,63.317789],[-171.791111,63.405846],[-171.731657,63.782515]]],[[[-155.06779,71.147776],[-154.344165,70.696409],[-153.900006,70.889989],[-152.210006,70.829992],[-152.270002,70.600006],[-150.739992,70.430017],[-149.720003,70.53001],[-147.613362,70.214035],[-145.68999,70.12001],[-144.920011,69.989992],[-143.589446,70.152514],[-142.07251,69.851938],[-140.985988,69.711998],[-140.985988,69.711998],[-140.992499,66.000029],[-140.99777,60.306397],[-140.012998,60.276838],[-139.039,60.000007],[-138.34089,59.56211],[-137.4525,58.905],[-136.47972,59.46389],[-135.47583,59.78778],[-134.945,59.27056],[-134.27111,58.86111],[-133.355549,58.410285],[-132.73042,57.69289],[-131.70781,56.55212],[-130.00778,55.91583],[-129.979994,55.284998],[-130.53611,54.802753],[-131.085818,55.178906],[-131.967211,55.497776],[-132.250011,56.369996],[-133.539181,57.178887],[-134.078063,58.123068],[-135.038211,58.187715],[-136.628062,58.212209],[-137.800006,58.499995],[-139.867787,59.537762],[-140.825274,59.727517],[-142.574444,60.084447],[-143.958881,59.99918],[-145.925557,60.45861],[-147.114374,60.884656],[-148.224306,60.672989],[-148.018066,59.978329],[-148.570823,59.914173],[-149.727858,59.705658],[-150.608243,59.368211],[-151.716393,59.155821],[-151.859433,59.744984],[-151.409719,60.725803],[-150.346941,61.033588],[-150.621111,61.284425],[-151.895839,60.727198],[-152.57833,60.061657],[-154.019172,59.350279],[-153.287511,58.864728],[-154.232492,58.146374],[-155.307491,57.727795],[-156.308335,57.422774],[-156.556097,56.979985],[-158.117217,56.463608],[-158.433321,55.994154],[-159.603327,55.566686],[-160.28972,55.643581],[-161.223048,55.364735],[-162.237766,55.024187],[-163.069447,54.689737],[-164.785569,54.404173],[-164.942226,54.572225],[-163.84834,55.039431],[-162.870001,55.348043],[-161.804175,55.894986],[-160.563605,56.008055],[-160.07056,56.418055],[-158.684443,57.016675],[-158.461097,57.216921],[-157.72277,57.570001],[-157.550274,58.328326],[-157.041675,58.918885],[-158.194731,58.615802],[-158.517218,58.787781],[-159.058606,58.424186],[-159.711667,58.93139],[-159.981289,58.572549],[-160.355271,59.071123],[-161.355003,58.670838],[-161.968894,58.671665],[-162.054987,59.266925],[-161.874171,59.633621],[-162.518059,59.989724],[-163.818341,59.798056],[-164.662218,60.267484],[-165.346388,60.507496],[-165.350832,61.073895],[-166.121379,61.500019],[-165.734452,62.074997],[-164.919179,62.633076],[-164.562508,63.146378],[-163.753332,63.219449],[-163.067224,63.059459],[-162.260555,63.541936],[-161.53445,63.455817],[-160.772507,63.766108],[-160.958335,64.222799],[-161.518068,64.402788],[-160.777778,64.788604],[-161.391926,64.777235],[-162.45305,64.559445],[-162.757786,64.338605],[-163.546394,64.55916],[-164.96083,64.446945],[-166.425288,64.686672],[-166.845004,65.088896],[-168.11056,65.669997],[-166.705271,66.088318],[-164.47471,66.57666],[-163.652512,66.57666],[-163.788602,66.077207],[-161.677774,66.11612],[-162.489715,66.735565],[-163.719717,67.116395],[-164.430991,67.616338],[-165.390287,68.042772],[-166.764441,68.358877],[-166.204707,68.883031],[-164.430811,68.915535],[-163.168614,69.371115],[-162.930566,69.858062],[-161.908897,70.33333],[-160.934797,70.44769],[-159.039176,70.891642],[-158.119723,70.824721],[-156.580825,71.357764],[-155.06779,71.147776]]]]}} 3 | ]} -------------------------------------------------------------------------------- /vendor/terraformer-arcgis-parser/terraformer-arcgis-parser.js: -------------------------------------------------------------------------------- 1 | /* globals Terraformer */ 2 | (function (root, factory) { 3 | 4 | // Node. 5 | if(typeof module === 'object' && typeof module.exports === 'object') { 6 | exports = module.exports = factory(require('terraformer')); 7 | } 8 | 9 | // Browser Global. 10 | if(typeof root.navigator === "object") { 11 | if (!root.Terraformer){ 12 | throw new Error("Terraformer.ArcGIS requires the core Terraformer library. https://github.com/esri/Terraformer"); 13 | } 14 | root.Terraformer.ArcGIS = factory(root.Terraformer); 15 | } 16 | 17 | }(this, function(Terraformer) { 18 | var exports = {}; 19 | 20 | // https://github.com/Esri/terraformer-arcgis-parser/issues/10 21 | function decompressGeometry(str) { 22 | var xDiffPrev = 0; 23 | var yDiffPrev = 0; 24 | var points = []; 25 | var x, y; 26 | var strings; 27 | var coefficient; 28 | 29 | // Split the string into an array on the + and - characters 30 | strings = str.match(/((\+|\-)[^\+\-]+)/g); 31 | 32 | // The first value is the coefficient in base 32 33 | coefficient = parseInt(strings[0], 32); 34 | 35 | for (var j = 1; j < strings.length; j += 2) { 36 | // j is the offset for the x value 37 | // Convert the value from base 32 and add the previous x value 38 | x = (parseInt(strings[j], 32) + xDiffPrev); 39 | xDiffPrev = x; 40 | 41 | // j+1 is the offset for the y value 42 | // Convert the value from base 32 and add the previous y value 43 | y = (parseInt(strings[j + 1], 32) + yDiffPrev); 44 | yDiffPrev = y; 45 | 46 | points.push([x / coefficient, y / coefficient]); 47 | } 48 | 49 | return points; 50 | } 51 | 52 | // checks if the first and last points of a ring are equal and closes the ring 53 | function closeRing(coordinates) { 54 | if (!pointsEqual(coordinates[0], coordinates[coordinates.length - 1])) { 55 | coordinates.push(coordinates[0]); 56 | } 57 | return coordinates; 58 | } 59 | 60 | // checks if 2 x,y points are equal 61 | function pointsEqual(a, b) { 62 | for (var i = 0; i < a.length; i++) { 63 | if (a[i] !== b[i]) { 64 | return false; 65 | } 66 | } 67 | return true; 68 | } 69 | 70 | // shallow object clone for feature properties and attributes 71 | // from http://jsperf.com/cloning-an-object/2 72 | function clone(obj) { 73 | var target = {}; 74 | for (var i in obj) { 75 | if (obj.hasOwnProperty(i)) { 76 | target[i] = obj[i]; 77 | } 78 | } 79 | return target; 80 | } 81 | 82 | // determine if polygon ring coordinates are clockwise. clockwise signifies outer ring, counter-clockwise an inner ring 83 | // or hole. this logic was found at http://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon- 84 | // points-are-in-clockwise-order 85 | function ringIsClockwise(ringToTest) { 86 | var total = 0,i = 0; 87 | var rLength = ringToTest.length; 88 | var pt1 = ringToTest[i]; 89 | var pt2; 90 | for (i; i < rLength - 1; i++) { 91 | pt2 = ringToTest[i + 1]; 92 | total += (pt2[0] - pt1[0]) * (pt2[1] + pt1[1]); 93 | pt1 = pt2; 94 | } 95 | return (total >= 0); 96 | } 97 | 98 | // This function ensures that rings are oriented in the right directions 99 | // outer rings are clockwise, holes are counterclockwise 100 | function orientRings(poly){ 101 | var output = []; 102 | var polygon = poly.slice(0); 103 | var outerRing = closeRing(polygon.shift().slice(0)); 104 | if(outerRing.length >= 4){ 105 | if(!ringIsClockwise(outerRing)){ 106 | outerRing.reverse(); 107 | } 108 | 109 | output.push(outerRing); 110 | 111 | for (var i = 0; i < polygon.length; i++) { 112 | var hole = closeRing(polygon[i].slice(0)); 113 | if(hole.length >= 4){ 114 | if(ringIsClockwise(hole)){ 115 | hole.reverse(); 116 | } 117 | output.push(hole); 118 | } 119 | } 120 | } 121 | 122 | return output; 123 | } 124 | 125 | // This function flattens holes in multipolygons to one array of polygons 126 | // [ 127 | // [ 128 | // [ array of outer coordinates ] 129 | // [ hole coordinates ] 130 | // [ hole coordinates ] 131 | // ], 132 | // [ 133 | // [ array of outer coordinates ] 134 | // [ hole coordinates ] 135 | // [ hole coordinates ] 136 | // ], 137 | // ] 138 | // becomes 139 | // [ 140 | // [ array of outer coordinates ] 141 | // [ hole coordinates ] 142 | // [ hole coordinates ] 143 | // [ array of outer coordinates ] 144 | // [ hole coordinates ] 145 | // [ hole coordinates ] 146 | // ] 147 | function flattenMultiPolygonRings(rings){ 148 | var output = []; 149 | for (var i = 0; i < rings.length; i++) { 150 | var polygon = orientRings(rings[i]); 151 | for (var x = polygon.length - 1; x >= 0; x--) { 152 | var ring = polygon[x].slice(0); 153 | output.push(ring); 154 | } 155 | } 156 | return output; 157 | } 158 | 159 | function coordinatesContainCoordinates(outer, inner){ 160 | var intersects = Terraformer.Tools.arraysIntersectArrays(outer, inner); 161 | var contains = Terraformer.Tools.coordinatesContainPoint(outer, inner[0]); 162 | if(!intersects && contains){ 163 | return true; 164 | } 165 | return false; 166 | } 167 | 168 | // do any polygons in this array contain any other polygons in this array? 169 | // used for checking for holes in arcgis rings 170 | function convertRingsToGeoJSON(rings){ 171 | var outerRings = []; 172 | var holes = []; 173 | 174 | // for each ring 175 | for (var r = 0; r < rings.length; r++) { 176 | var ring = closeRing(rings[r].slice(0)); 177 | if(ring.length < 4){ 178 | continue; 179 | } 180 | // is this ring an outer ring? is it clockwise? 181 | if(ringIsClockwise(ring)){ 182 | var polygon = [ ring ]; 183 | outerRings.push(polygon); // push to outer rings 184 | } else { 185 | holes.push(ring); // counterclockwise push to holes 186 | } 187 | } 188 | 189 | // while there are holes left... 190 | while(holes.length){ 191 | // pop a hole off out stack 192 | var hole = holes.pop(); 193 | var matched = false; 194 | 195 | // loop over all outer rings and see if they contain our hole. 196 | for (var x = outerRings.length - 1; x >= 0; x--) { 197 | var outerRing = outerRings[x][0]; 198 | if(coordinatesContainCoordinates(outerRing, hole)){ 199 | // the hole is contained push it into our polygon 200 | outerRings[x].push(hole); 201 | 202 | // we matched the hole 203 | matched = true; 204 | 205 | // stop checking to see if other outer rings contian this hole 206 | break; 207 | } 208 | } 209 | 210 | // no outer rings contain this hole turn it into and outer ring (reverse it) 211 | if(!matched){ 212 | outerRings.push([ hole.reverse() ]); 213 | } 214 | } 215 | 216 | if(outerRings.length === 1){ 217 | return { 218 | type: "Polygon", 219 | coordinates: outerRings[0] 220 | }; 221 | } else { 222 | return { 223 | type: "MultiPolygon", 224 | coordinates: outerRings 225 | }; 226 | } 227 | } 228 | 229 | // ArcGIS -> GeoJSON 230 | function parse(arcgis, options){ 231 | var geojson = {}; 232 | 233 | options = options || {}; 234 | options.idAttribute = options.idAttribute || undefined; 235 | 236 | if(typeof arcgis.x === 'number' && typeof arcgis.y === 'number'){ 237 | geojson.type = "Point"; 238 | geojson.coordinates = [arcgis.x, arcgis.y]; 239 | if (arcgis.z || arcgis.m){ 240 | geojson.coordinates.push(arcgis.z); 241 | } 242 | if (arcgis.m){ 243 | geojson.coordinates.push(arcgis.m); 244 | } 245 | } 246 | 247 | if(arcgis.points){ 248 | geojson.type = "MultiPoint"; 249 | geojson.coordinates = arcgis.points.slice(0); 250 | } 251 | 252 | if(arcgis.paths) { 253 | if(arcgis.paths.length === 1){ 254 | geojson.type = "LineString"; 255 | geojson.coordinates = arcgis.paths[0].slice(0); 256 | } else { 257 | geojson.type = "MultiLineString"; 258 | geojson.coordinates = arcgis.paths.slice(0); 259 | } 260 | } 261 | 262 | if(arcgis.rings) { 263 | geojson = convertRingsToGeoJSON(arcgis.rings.slice(0)); 264 | } 265 | 266 | if(arcgis.compressedGeometry || arcgis.geometry || arcgis.attributes) { 267 | geojson.type = "Feature"; 268 | 269 | if(arcgis.compressedGeometry){ 270 | arcgis.geometry = { 271 | paths: [ 272 | decompressGeometry(arcgis.compressedGeometry) 273 | ] 274 | }; 275 | } 276 | 277 | geojson.geometry = (arcgis.geometry) ? parse(arcgis.geometry) : null; 278 | geojson.properties = (arcgis.attributes) ? clone(arcgis.attributes) : null; 279 | if(arcgis.attributes) { 280 | geojson.id = arcgis.attributes[options.idAttribute] || arcgis.attributes.OBJECTID || arcgis.attributes.FID; 281 | } 282 | } 283 | 284 | var inputSpatialReference = (arcgis.geometry) ? arcgis.geometry.spatialReference : arcgis.spatialReference; 285 | 286 | //convert spatial ref if needed 287 | if(inputSpatialReference && inputSpatialReference.wkid === 102100){ 288 | geojson = Terraformer.toGeographic(geojson); 289 | } 290 | 291 | return new Terraformer.Primitive(geojson); 292 | } 293 | 294 | // GeoJSON -> ArcGIS 295 | function convert(geojson, options){ 296 | var spatialReference; 297 | 298 | options = options || {}; 299 | var idAttribute = options.idAttribute || "OBJECTID"; 300 | 301 | if(options.sr){ 302 | spatialReference = { wkid: options.sr }; 303 | } else if (geojson && geojson.crs === Terraformer.MercatorCRS) { 304 | spatialReference = { wkid: 102100 }; 305 | } else { 306 | spatialReference = { wkid: 4326 }; 307 | } 308 | 309 | var result = {}; 310 | var i; 311 | 312 | switch(geojson.type){ 313 | case "Point": 314 | result.x = geojson.coordinates[0]; 315 | result.y = geojson.coordinates[1]; 316 | if(geojson.coordinates[2]) { 317 | result.z = geojson.coordinates[2]; 318 | } 319 | if(geojson.coordinates[3]) { 320 | result.m = geojson.coordinates[3]; 321 | } 322 | result.spatialReference = spatialReference; 323 | break; 324 | case "MultiPoint": 325 | result.points = geojson.coordinates.slice(0); 326 | result.spatialReference = spatialReference; 327 | break; 328 | case "LineString": 329 | result.paths = [geojson.coordinates.slice(0)]; 330 | result.spatialReference = spatialReference; 331 | break; 332 | case "MultiLineString": 333 | result.paths = geojson.coordinates.slice(0); 334 | result.spatialReference = spatialReference; 335 | break; 336 | case "Polygon": 337 | result.rings = orientRings(geojson.coordinates.slice(0)); 338 | result.spatialReference = spatialReference; 339 | break; 340 | case "MultiPolygon": 341 | result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0)); 342 | result.spatialReference = spatialReference; 343 | break; 344 | case "Feature": 345 | if(geojson.geometry) { 346 | result.geometry = convert(geojson.geometry, options); 347 | } 348 | result.attributes = (geojson.properties) ? clone(geojson.properties) : {}; 349 | result.attributes[idAttribute] = geojson.id; 350 | break; 351 | case "FeatureCollection": 352 | result = []; 353 | for (i = 0; i < geojson.features.length; i++){ 354 | result.push(convert(geojson.features[i], options)); 355 | } 356 | break; 357 | case "GeometryCollection": 358 | result = []; 359 | for (i = 0; i < geojson.geometries.length; i++){ 360 | result.push(convert(geojson.geometries[i], options)); 361 | } 362 | break; 363 | } 364 | 365 | return result; 366 | } 367 | 368 | function parseCompressedGeometry(string){ 369 | return new Terraformer.LineString(decompressGeometry(string)); 370 | } 371 | 372 | exports.parse = parse; 373 | exports.convert = convert; 374 | exports.toGeoJSON = parse; 375 | exports.fromGeoJSON = convert; 376 | exports.parseCompressedGeometry = parseCompressedGeometry; 377 | 378 | return exports; 379 | })); 380 | -------------------------------------------------------------------------------- /src/geojsonlayer.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "dojo/_base/declare", 3 | "esri/graphic", 4 | "esri/layers/GraphicsLayer", 5 | "esri/InfoTemplate", 6 | "esri/graphicsUtils", 7 | "esri/Color", 8 | "esri/symbols/SimpleMarkerSymbol", 9 | "esri/symbols/SimpleLineSymbol", 10 | "esri/symbols/SimpleFillSymbol", 11 | "esri/renderers/SimpleRenderer", 12 | "esri/SpatialReference", 13 | "esri/geometry/webMercatorUtils", 14 | "esri/request", 15 | "esri/config", 16 | "dojo/_base/url", 17 | "dojo/_base/lang" 18 | ], function (declare, Graphic, GraphicsLayer, InfoTemplate, graphicsUtils, Color, SimpleMarkerSymbol, 19 | SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, SpatialReference, webMercatorUtils, esriRequest, esriConfig, Url, lang 20 | ) { 21 | return declare([GraphicsLayer], { 22 | 23 | // Required Terrformer library reference 24 | _terrafomer: (typeof Terraformer !== 'undefined') ? Terraformer : null, 25 | 26 | constructor: function (options) { 27 | // options: 28 | // url: String 29 | // Path to file or server endpoint. Server must be on the same domain or cors enabled. Or use a proxy. 30 | // data: Object[] 31 | // Optional: FeatureCollection of GeoJson features. This will override url if both are provided. 32 | // maxdraw: Number 33 | // Optional: The maximum graphics to render. Default is 1000. 34 | this._validState = true; 35 | // First look for url 36 | this._url = options.url; 37 | // Accept data as geojson features array. This will override options.url! 38 | this._data = options.data; 39 | // GeoJSON spatial reference (not optional) 40 | this._inSpatialReference = new SpatialReference({wkid: 4326}); // Data must be in Geographic Coordinates 41 | // GeoJSON transformation (optional) 42 | this._outSpatialReference = null; 43 | // Default popup 44 | if (options.infoTemplate !== false) { 45 | this.setInfoTemplate(options.infoTemplate || new InfoTemplate("GeoJSON Data", "${*}")); 46 | } 47 | // Renderer 48 | if (options.renderer) { 49 | this.renderer = options.renderer; 50 | } 51 | // Default symbols 52 | this._setDefaultSymbols(); 53 | // Enable browser to make cross-domain requests 54 | this._setCorsSevers(); 55 | this._setXhrDefaults(10000); 56 | // Manage drawing 57 | this._maxDraw = options.maxdraw || 1000; // default to 1000 graphics 58 | this._drawCount = 0; 59 | this._drawCountTotal = 0; 60 | // Extended public properties 61 | this.extent = null; 62 | // Graphics layer does not call onLoad natively but we'll call it after features have been added to layer 63 | if (options.onLoad && typeof options.onLoad === 'function') { 64 | this.onLoad = options.onLoad; 65 | } 66 | // Make sure the environment is good to go! 67 | this._updateState(); 68 | }, 69 | 70 | _setDefaultSymbols: function () { 71 | function getRandomColor(mainColor, transparency) { 72 | function getRandomInt(min, max) { 73 | return Math.floor(Math.random() * (max - min + 1)) + min; 74 | } 75 | switch (mainColor) { 76 | case "red": 77 | return new Color([getRandomInt(150, 255), getRandomInt(0, 255), getRandomInt(0, 255), transparency]); 78 | case "green": 79 | return new Color([getRandomInt(0, 155), getRandomInt(150, 255), getRandomInt(0, 155), transparency]); 80 | case "blue": 81 | return new Color([getRandomInt(0, 255), getRandomInt(0, 255), getRandomInt(150, 255), transparency]); 82 | } 83 | } 84 | // Random colors 85 | this._simplePointSym = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 8, 86 | new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, getRandomColor("blue", 0.5), 1), 87 | getRandomColor("blue", 0.75)); 88 | this._simpleLineSym = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, getRandomColor("red", 0.9), 2); 89 | this._simplePolygonSym = new SimpleFillSymbol("solid", 90 | new SimpleLineSymbol("solid", new Color([50, 50, 50, 0.15]), 1), 91 | getRandomColor("green", 0.15)); 92 | // Option to hardcod colors here 93 | // this._simplePointSym = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 8, 94 | // new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([150, 150, 150]), 0.5), 95 | // new Color([50, 130, 255, 0.75])); 96 | // this._simpleLineSym = new SimpleLineSymbol("solid", new Color([255, 50, 50, 0.75]), 2); 97 | // this._simplePolygonSym = new SimpleFillSymbol("solid", 98 | // new SimpleLineSymbol("solid", new Color([0, 0, 0, 0.10]), 1), 99 | // new Color([150, 255, 150, 0.10])); 100 | }, 101 | 102 | _setCorsSevers: function () { 103 | // Allow browser to make cross-domain requests 104 | esriConfig.defaults.io.corsEnabledServers.push("http://sampleserver6.arcgisonline.com"); 105 | // Add server 106 | if (this._url) { 107 | var url = new Url(this._url), 108 | scheme = url.scheme, 109 | host = url.host, 110 | port = url.port, 111 | server = scheme + "://" + host; // + "/"; // + (port ? port : ""); // TODO 112 | if (scheme && host) { 113 | esriConfig.defaults.io.corsEnabledServers.push(server); 114 | } 115 | } 116 | }, 117 | 118 | _setXhrDefaults: function (postSize) { 119 | esriConfig.defaults.io.postLength = postSize; // max size of post request 120 | }, 121 | 122 | _updateState: function () { 123 | if (!this._inSpatialReference) { 124 | this._validState = false; 125 | console.error("GeoJsonLayer Error: Invalid SpatialReference."); 126 | } 127 | if (!this._terrafomer) { 128 | this._validState = false; 129 | console.error("GeoJsonLayer Error: Invalid Terraformer reference. Please add a reference to your html page."); 130 | } 131 | }, 132 | 133 | // GraphicLayer overrides 134 | _setMap: function (map, surface) { 135 | var div = this.inherited(arguments); 136 | // Check spatial reference 137 | if (!this._validState) { 138 | return div; 139 | } 140 | // Set sr if need to project 141 | this._outSpatialReference = map.spatialReference; 142 | // Load GeoJSON as graphics 143 | this._loadGeoJson(); 144 | // Return div - sets this.id 145 | return div; 146 | }, 147 | 148 | _unsetMap: function () { 149 | return this.inherited(arguments); 150 | }, 151 | 152 | add: function (graphic) { 153 | if (!this._validState) { 154 | return; 155 | } 156 | // Can do more with graphic if needed 157 | this.inherited(arguments); 158 | this._incrementDrawCount(); 159 | return; 160 | }, 161 | 162 | clear: function () { 163 | this._drawCount = 0; 164 | this._drawCountMax = 0; 165 | return this.inherited(arguments); 166 | }, 167 | 168 | // GeoJsonLayer class functions 169 | _loadGeoJson: function () { 170 | if (this._data) { 171 | // Load data 172 | this._getGeoJson(this._data); 173 | } else if (this._url) { 174 | // XHR request 175 | this._getGeoJsonXhr(this._url); 176 | } 177 | }, 178 | 179 | _getGeoJsonXhr: function (url) { 180 | // xhr request to get data 181 | var requestHandle = esriRequest({ 182 | url: url, 183 | handleAs: "json" 184 | }); 185 | requestHandle.then(lang.hitch(this, this._getGeoJson), 186 | lang.hitch(this, this._errorGetGeoJsonXhr)); 187 | }, 188 | 189 | _getGeoJson: function (geojson) { 190 | // Check data 191 | if (geojson.type !== "FeatureCollection" || !geojson.features) { 192 | console.error("GeoJsonLayer Error: Invalid GeoJSON FeatureCollection. Check url or data structure."); 193 | return; 194 | } 195 | // Convert GeoJSON to ArcGIS JSON 196 | var arcgisJson = this._terraformerConverter(geojson); 197 | // Add graphics to layer 198 | this._addGraphics(arcgisJson); 199 | }, 200 | 201 | // GeoJSON to ArcGIS JSON 202 | _terraformerConverter: function (geojson) { 203 | var json, 204 | arcgis; 205 | // Convert the geojson object to a Primitive json representation 206 | json = new this._terrafomer.Primitive(geojson); 207 | // Convert to ArcGIS JSON 208 | arcgis = this._terrafomer.ArcGIS.convert(json); 209 | return arcgis; 210 | }, 211 | 212 | _errorGetGeoJsonXhr: function (e) { 213 | console.error("GeoJsonLayer Error: Couldn't load GeoJSON. Check url. File must be on the same domain or server must be CORS enabled.\n\n" + e); 214 | }, 215 | 216 | _incrementDrawCount: function () { 217 | this._drawCount++; 218 | if (this._drawCount === this._drawCountTotal) { 219 | this._updateLayerExtent(); 220 | this.onUpdateEnd(); 221 | } 222 | }, 223 | 224 | _decrementDrawCount: function () { 225 | this._drawCountTotal--; 226 | }, 227 | 228 | _updateLayerExtent: function () { 229 | var extent; 230 | if (this.graphics.length) { 231 | extent = graphicsUtils.graphicsExtent(this.graphics); 232 | } 233 | this.extent = extent; 234 | }, 235 | 236 | // Type functions 237 | _getEsriSymbol: function (geometryType) { 238 | var sym; 239 | switch (geometryType) { 240 | case "point": 241 | sym = this._simplePointSym; 242 | break; 243 | case "multipoint": 244 | sym = this._simplePointSym; 245 | break; 246 | case "polyline": 247 | sym = this._simpleLineSym; 248 | break; 249 | case "polygon": 250 | sym = this._simplePolygonSym; 251 | break; 252 | case "extent": 253 | sym = this._simplePolygonSym; 254 | break; 255 | } 256 | return sym; 257 | }, 258 | 259 | _addGraphicToLayer: function (graphic) { 260 | // Add or project and then add graphic 261 | if (this._inSpatialReference.wkid === 4326 || this._inSpatialReference.wkid === 102100) { 262 | // ArcGIS API automatically translates between these! 263 | // if (graphic.geometry.spatialReference.wkid === 4326) { 264 | // graphic.setGeometry(webMercatorUtils.geographicToWebMercator(graphic.geometry)); 265 | // } 266 | // Add graphic directly 267 | this.add(graphic); 268 | } 269 | }, 270 | 271 | _createGraphic: function (arcgisJson) { 272 | var graphic; 273 | // This magically sets geometry type! 274 | graphic = new Graphic(arcgisJson); 275 | // Set the correct symbol based on type and render - NOTE: Only supports simple renderers 276 | if (this.renderer && this.renderer.symbol) { 277 | //graphic.setSymbol(this.render.getSymbol(graphic)); // use for complex renderers 278 | graphic.setSymbol(this.renderer.symbol); 279 | } else { 280 | graphic.setSymbol(this._getEsriSymbol(graphic.geometry.type)); 281 | } 282 | // Update SR because terraformer sets incorrect spatial reference 283 | graphic.geometry.setSpatialReference(this._inSpatialReference); // NOTE: Has to match features! 284 | return graphic; 285 | }, 286 | 287 | _addGraphics: function (arcgisJson) { 288 | var i, 289 | feature, 290 | graphic; 291 | // Limit size of data that can be drawn 292 | if (arcgisJson.length > this._maxDraw) { 293 | this._drawCountTotal = this._maxDraw; 294 | console.warn("GeoJsonLayer Warning: Large dataset detected. Only drawing the first " + this._maxDraw + " features!"); 295 | } else { 296 | this._drawCountTotal = arcgisJson.length; 297 | } 298 | // Add graphics to the layer with symbols, project if needed 299 | for (i = 0; i < this._drawCountTotal; i++) { 300 | feature = arcgisJson[i]; 301 | // Create graphic - magically sets the geometry type! 302 | graphic = this._createGraphic(feature); 303 | // Add to layer 304 | this._addGraphicToLayer(graphic); 305 | } 306 | // Call onLoad 307 | // emit mixes in `layer` and `target` properties as event object 308 | // onLoad provided via constructor just returns `layer` object 309 | this.onLoad(this); 310 | } 311 | }); 312 | }); -------------------------------------------------------------------------------- /vendor/terraformer/terraformer.min.js: -------------------------------------------------------------------------------- 1 | /*! Terraformer JS - 1.0.3 - 2014-02-24 2 | * https://github.com/esri/Terraformer 3 | * Copyright (c) 2014 Environmental Systems Research Institute, Inc. 4 | * Licensed MIT */!function(a,b){"object"==typeof module&&"object"==typeof module.exports&&(exports=module.exports=b()),"object"==typeof window&&(a.Terraformer=b())}(this,function(){function a(a){return"[object Array]"===Object.prototype.toString.call(a)}function b(){var a=Array.prototype.slice.apply(arguments);void 0!==typeof console&&console.warn&&console.warn.apply(console,a)}function c(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function d(a){if(a.type)switch(a.type){case"Point":return[a.coordinates[0],a.coordinates[1],a.coordinates[0],a.coordinates[1]];case"MultiPoint":return g(a.coordinates);case"LineString":return g(a.coordinates);case"MultiLineString":return e(a.coordinates);case"Polygon":return e(a.coordinates);case"MultiPolygon":return f(a.coordinates);case"Feature":return a.geometry?d(a.geometry):null;case"FeatureCollection":return h(a);case"GeometryCollection":return i(a);default:throw new Error("Unknown type: "+a.type)}return null}function e(a){for(var b=null,c=null,d=null,e=null,f=0;fj&&(b=j),null===c?c=j:j>c&&(c=j),null===d?d=k:d>k&&(d=k),null===e?e=k:k>e&&(e=k)}return[b,d,c,e]}function f(a){for(var b=null,c=null,d=null,e=null,f=0;fl&&(b=l),null===c?c=l:l>c&&(c=l),null===d?d=m:d>m&&(d=m),null===e?e=m:m>e&&(e=m)}return[b,d,c,e]}function g(a){for(var b=null,c=null,d=null,e=null,f=0;fh&&(b=h),null===c?c=h:h>c&&(c=h),null===d?d=i:d>i&&(d=i),null===e?e=i:i>e&&(e=i)}return[b,d,c,e]}function h(a){for(var b,c=[],e=a.features.length-1;e>=0;e--)b=d(a.features[e].geometry),c.push([b[0],b[1]]),c.push([b[2],b[3]]);return g(c)}function i(a){for(var b,c=[],e=a.geometries.length-1;e>=0;e--)b=d(a.geometries[e]),c.push([b[0],b[1]]),c.push([b[2],b[3]]);return g(c)}function k(a){var b=d(a);return{x:b[0],y:b[1],w:Math.abs(b[0]-b[2]),h:Math.abs(b[1]-b[3])}}function l(a){return a*Z}function m(a){return a*$}function n(a,b){for(var c=0;ca?-1:a>b?1:0}function u(a,b){return a[0]-b[0]>a[1]-b[1]?1:a[0]-b[0]w(b,c))&&(c=a[d])}return c}function y(a){if(0===a.length)return[];if(1===a.length)return a;for(var b=[a.sort(u)[0]],c=0;c=0&&1>=h&&i>=0&&1>=i)return!0}return!1}function C(a,b){for(var c=0;c=2))throw"Terraformer: invalid input for Terraformer.Point";this.coordinates=d}this.type="Point"}function N(b){if(b&&"MultiPoint"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiPoint";this.coordinates=b}this.type="MultiPoint"}function O(b){if(b&&"LineString"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.LineString";this.coordinates=b}this.type="LineString"}function P(b){if(b&&"MultiLineString"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiLineString";this.coordinates=b}this.type="MultiLineString"}function Q(b){if(b&&"Polygon"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.Polygon";this.coordinates=b}this.type="Polygon"}function R(b){if(b&&"MultiPolygon"===b.type&&b.coordinates)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.MultiPolygon";this.coordinates=b}this.type="MultiPolygon"}function S(a){if(a&&"Feature"===a.type)c(this,a);else{if(!(a&&a.type&&a.coordinates))throw"Terraformer: invalid input for Terraformer.Feature";this.geometry=a}this.type="Feature"}function T(b){if(b&&"FeatureCollection"===b.type&&b.features)c(this,b);else{if(!a(b))throw"Terraformer: invalid input for Terraformer.FeatureCollection";this.features=b}this.type="FeatureCollection"}function U(b){if(b&&"GeometryCollection"===b.type&&b.geometries)c(this,b);else if(a(b))this.geometries=b;else{if(!b.coordinates||!b.type)throw"Terraformer: invalid input for Terraformer.GeometryCollection";this.type="GeometryCollection",this.geometries=[b]}this.type="GeometryCollection"}function V(a,b,c){for(var d=p(a),e=c||64,f={type:"Polygon",coordinates:[[]]},g=1;e>=g;g++){var h=g*(360/e)*Math.PI/180;f.coordinates[0].push([d[0]+b*Math.cos(h),d[1]+b*Math.sin(h)])}return f.coordinates=I(f.coordinates),s(f)}function W(a,b,d){var e=d||64,f=b||250;if(!a||a.length<2||!f||!e)throw new Error("Terraformer: missing parameter for Terraformer.Circle");c(this,new S({type:"Feature",geometry:V(a,f,e),properties:{radius:f,center:a,steps:e}}))}var X={},Y=6378137,Z=57.29577951308232,$=.017453292519943,_={type:"link",properties:{href:"http://spatialreference.org/ref/sr-org/6928/ogcwkt/",type:"ogcwkt"}},ab={type:"link",properties:{href:"http://spatialreference.org/ref/epsg/4326/ogcwkt/",type:"ogcwkt"}},bb=["length"];return L.prototype.toMercator=function(){return r(this)},L.prototype.toGeographic=function(){return s(this)},L.prototype.envelope=function(){return k(this)},L.prototype.bbox=function(){return d(this)},L.prototype.convexHull=function(){var a,b,c=[];if("Point"===this.type)return null;if("LineString"===this.type||"MultiPoint"===this.type){if(!(this.coordinates&&this.coordinates.length>=3))return null;c=this.coordinates}else if("Polygon"===this.type||"MultiLineString"===this.type){if(!(this.coordinates&&this.coordinates.length>0))return null;for(a=0;a0))return null;for(a=0;a x2) { 138 | x2 = lon; 139 | } 140 | 141 | if (y1 === null) { 142 | y1 = lat; 143 | } else if (lat < y1) { 144 | y1 = lat; 145 | } 146 | 147 | if (y2 === null) { 148 | y2 = lat; 149 | } else if (lat > y2) { 150 | y2 = lat; 151 | } 152 | } 153 | } 154 | 155 | return [x1, y1, x2, y2 ]; 156 | } 157 | 158 | /* 159 | Internal: Calculate a bounding box from an array of arrays of arrays 160 | [ 161 | [ [lng, lat],[lng, lat],[lng, lat] ] 162 | [ [lng, lat],[lng, lat],[lng, lat] ] 163 | [ [lng, lat],[lng, lat],[lng, lat] ] 164 | ] 165 | */ 166 | function calculateBoundsFromNestedArrayOfArrays (array) { 167 | var x1 = null, x2 = null, y1 = null, y2 = null; 168 | 169 | for (var i = 0; i < array.length; i++) { 170 | var inner = array[i]; 171 | 172 | for (var j = 0; j < inner.length; j++) { 173 | var innerinner = inner[j]; 174 | for (var k = 0; k < innerinner.length; k++) { 175 | var lonlat = innerinner[k]; 176 | 177 | var lon = lonlat[0]; 178 | var lat = lonlat[1]; 179 | 180 | if (x1 === null) { 181 | x1 = lon; 182 | } else if (lon < x1) { 183 | x1 = lon; 184 | } 185 | 186 | if (x2 === null) { 187 | x2 = lon; 188 | } else if (lon > x2) { 189 | x2 = lon; 190 | } 191 | 192 | if (y1 === null) { 193 | y1 = lat; 194 | } else if (lat < y1) { 195 | y1 = lat; 196 | } 197 | 198 | if (y2 === null) { 199 | y2 = lat; 200 | } else if (lat > y2) { 201 | y2 = lat; 202 | } 203 | } 204 | } 205 | } 206 | 207 | return [x1, y1, x2, y2]; 208 | } 209 | 210 | /* 211 | Internal: Calculate a bounding box from an array of positions 212 | [ 213 | [lng, lat],[lng, lat],[lng, lat] 214 | ] 215 | */ 216 | function calculateBoundsFromArray (array) { 217 | var x1 = null, x2 = null, y1 = null, y2 = null; 218 | 219 | for (var i = 0; i < array.length; i++) { 220 | var lonlat = array[i]; 221 | var lon = lonlat[0]; 222 | var lat = lonlat[1]; 223 | 224 | if (x1 === null) { 225 | x1 = lon; 226 | } else if (lon < x1) { 227 | x1 = lon; 228 | } 229 | 230 | if (x2 === null) { 231 | x2 = lon; 232 | } else if (lon > x2) { 233 | x2 = lon; 234 | } 235 | 236 | if (y1 === null) { 237 | y1 = lat; 238 | } else if (lat < y1) { 239 | y1 = lat; 240 | } 241 | 242 | if (y2 === null) { 243 | y2 = lat; 244 | } else if (lat > y2) { 245 | y2 = lat; 246 | } 247 | } 248 | 249 | return [x1, y1, x2, y2 ]; 250 | } 251 | 252 | /* 253 | Internal: Calculate an bounding box for a feature collection 254 | */ 255 | function calculateBoundsForFeatureCollection(featureCollection){ 256 | var extents = [], extent; 257 | for (var i = featureCollection.features.length - 1; i >= 0; i--) { 258 | extent = calculateBounds(featureCollection.features[i].geometry); 259 | extents.push([extent[0],extent[1]]); 260 | extents.push([extent[2],extent[3]]); 261 | } 262 | 263 | return calculateBoundsFromArray(extents); 264 | } 265 | 266 | /* 267 | Internal: Calculate an bounding box for a geometry collection 268 | */ 269 | function calculateBoundsForGeometryCollection(geometryCollection){ 270 | var extents = [], extent; 271 | 272 | for (var i = geometryCollection.geometries.length - 1; i >= 0; i--) { 273 | extent = calculateBounds(geometryCollection.geometries[i]); 274 | extents.push([extent[0],extent[1]]); 275 | extents.push([extent[2],extent[3]]); 276 | } 277 | 278 | return calculateBoundsFromArray(extents); 279 | } 280 | 281 | function calculateEnvelope(geojson){ 282 | var bounds = calculateBounds(geojson); 283 | return { 284 | x: bounds[0], 285 | y: bounds[1], 286 | w: Math.abs(bounds[0] - bounds[2]), 287 | h: Math.abs(bounds[1] - bounds[3]) 288 | }; 289 | } 290 | 291 | /* 292 | Internal: Convert radians to degrees. Used by spatial reference converters. 293 | */ 294 | function radToDeg(rad) { 295 | return rad * DegreesPerRadian; 296 | } 297 | 298 | /* 299 | Internal: Convert degrees to radians. Used by spatial reference converters. 300 | */ 301 | function degToRad(deg) { 302 | return deg * RadiansPerDegree; 303 | } 304 | 305 | /* 306 | Internal: Loop over each array in a geojson object and apply a function to it. Used by spatial reference converters. 307 | */ 308 | function eachPosition(coordinates, func) { 309 | for (var i = 0; i < coordinates.length; i++) { 310 | // we found a number so lets convert this pair 311 | if(typeof coordinates[i][0] === "number"){ 312 | coordinates[i] = func(coordinates[i]); 313 | } 314 | // we found an coordinates array it again and run THIS function against it 315 | if(typeof coordinates[i] === "object"){ 316 | coordinates[i] = eachPosition(coordinates[i], func); 317 | } 318 | } 319 | return coordinates; 320 | } 321 | 322 | /* 323 | Public: Convert a GeoJSON Position object to Geographic (4326) 324 | */ 325 | function positionToGeographic(position) { 326 | var x = position[0]; 327 | var y = position[1]; 328 | return [radToDeg(x / EarthRadius) - (Math.floor((radToDeg(x / EarthRadius) + 180) / 360) * 360), radToDeg((Math.PI / 2) - (2 * Math.atan(Math.exp(-1.0 * y / EarthRadius))))]; 329 | } 330 | 331 | /* 332 | Public: Convert a GeoJSON Position object to Web Mercator (102100) 333 | */ 334 | function positionToMercator(position) { 335 | var lng = position[0]; 336 | var lat = Math.max(Math.min(position[1], 89.99999), -89.99999); 337 | return [degToRad(lng) * EarthRadius, EarthRadius/2.0 * Math.log( (1.0 + Math.sin(degToRad(lat))) / (1.0 - Math.sin(degToRad(lat))) )]; 338 | } 339 | 340 | /* 341 | Public: Apply a function agaist all positions in a geojson object. Used by spatial reference converters. 342 | */ 343 | function applyConverter(geojson, converter, noCrs){ 344 | if(geojson.type === "Point") { 345 | geojson.coordinates = converter(geojson.coordinates); 346 | } else if(geojson.type === "Feature") { 347 | geojson.geometry = applyConverter(geojson.geometry, converter, true); 348 | } else if(geojson.type === "FeatureCollection") { 349 | for (var f = 0; f < geojson.features.length; f++) { 350 | geojson.features[f] = applyConverter(geojson.features[f], converter, true); 351 | } 352 | } else if(geojson.type === "GeometryCollection") { 353 | for (var g = 0; g < geojson.geometries.length; g++) { 354 | geojson.geometries[g] = applyConverter(geojson.geometries[g], converter, true); 355 | } 356 | } else { 357 | geojson.coordinates = eachPosition(geojson.coordinates, converter); 358 | } 359 | 360 | if(!noCrs){ 361 | if(converter === positionToMercator){ 362 | geojson.crs = MercatorCRS; 363 | } 364 | } 365 | 366 | if(converter === positionToGeographic){ 367 | delete geojson.crs; 368 | } 369 | 370 | return geojson; 371 | } 372 | 373 | /* 374 | Public: Convert a GeoJSON object to ESRI Web Mercator (102100) 375 | */ 376 | function toMercator(geojson) { 377 | return applyConverter(geojson, positionToMercator); 378 | } 379 | 380 | /* 381 | Convert a GeoJSON object to Geographic coordinates (WSG84, 4326) 382 | */ 383 | function toGeographic(geojson) { 384 | return applyConverter(geojson, positionToGeographic); 385 | } 386 | 387 | 388 | /* 389 | Internal: -1,0,1 comparison function 390 | */ 391 | function cmp(a, b) { 392 | if(a < b) { 393 | return -1; 394 | } else if(a > b) { 395 | return 1; 396 | } else { 397 | return 0; 398 | } 399 | } 400 | 401 | /* 402 | Internal: used for sorting 403 | */ 404 | function compSort(p1, p2) { 405 | if(p1[0] - p2[0] > p1[1] - p2[1]) { 406 | return 1; 407 | } else if(p1[0] - p2[0] < p1[1] - p2[1]) { 408 | return -1; 409 | } else { 410 | return 0; 411 | } 412 | } 413 | 414 | 415 | /* 416 | Internal: used to determine turn 417 | */ 418 | function turn(p, q, r) { 419 | // Returns -1, 0, 1 if p,q,r forms a right, straight, or left turn. 420 | return cmp((q[0] - p[0]) * (r[1] - p[1]) - (r[0] - p[0]) * (q[1] - p[1]), 0); 421 | } 422 | 423 | /* 424 | Internal: used to determine euclidean distance between two points 425 | */ 426 | function euclideanDistance(p, q) { 427 | // Returns the squared Euclidean distance between p and q. 428 | var dx = q[0] - p[0]; 429 | var dy = q[1] - p[1]; 430 | 431 | return dx * dx + dy * dy; 432 | } 433 | 434 | function nextHullPoint(points, p) { 435 | // Returns the next point on the convex hull in CCW from p. 436 | var q = p; 437 | for(var r in points) { 438 | var t = turn(p, q, points[r]); 439 | if(t === -1 || t === 0 && euclideanDistance(p, points[r]) > euclideanDistance(p, q)) { 440 | q = points[r]; 441 | } 442 | } 443 | return q; 444 | } 445 | 446 | function convexHull(points) { 447 | // implementation of the Jarvis March algorithm 448 | // adapted from http://tixxit.wordpress.com/2009/12/09/jarvis-march/ 449 | 450 | if(points.length === 0) { 451 | return []; 452 | } else if(points.length === 1) { 453 | return points; 454 | } 455 | 456 | // Returns the points on the convex hull of points in CCW order. 457 | var hull = [points.sort(compSort)[0]]; 458 | 459 | for(var p = 0; p < hull.length; p++) { 460 | var q = nextHullPoint(points, hull[p]); 461 | 462 | if(q !== hull[0]) { 463 | hull.push(q); 464 | } 465 | } 466 | 467 | return hull; 468 | } 469 | 470 | function coordinatesContainPoint(coordinates, point) { 471 | var contains = false; 472 | for(var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) { 473 | if (((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1]) || 474 | (coordinates[j][1] <= point[1] && point[1] < coordinates[i][1])) && 475 | (point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0])) { 476 | contains = !contains; 477 | } 478 | } 479 | return contains; 480 | } 481 | 482 | function polygonContainsPoint(polygon, point) { 483 | if (polygon && polygon.length) { 484 | if (polygon.length === 1) { // polygon with no holes 485 | return coordinatesContainPoint(polygon[0], point); 486 | } else { // polygon with holes 487 | if (coordinatesContainPoint(polygon[0], point)) { 488 | for (var i = 1; i < polygon.length; i++) { 489 | if (coordinatesContainPoint(polygon[i], point)) { 490 | return false; // found in hole 491 | } 492 | } 493 | 494 | return true; 495 | } else { 496 | return false; 497 | } 498 | } 499 | } else { 500 | return false; 501 | } 502 | } 503 | 504 | function vertexIntersectsVertex(a1, a2, b1, b2) { 505 | var ua_t = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]); 506 | var ub_t = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]); 507 | var u_b = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]); 508 | 509 | if ( u_b !== 0 ) { 510 | var ua = ua_t / u_b; 511 | var ub = ub_t / u_b; 512 | 513 | if ( 0 <= ua && ua <= 1 && 0 <= ub && ub <= 1 ) { 514 | return true; 515 | } 516 | } 517 | 518 | return false; 519 | } 520 | 521 | function arrayIntersectsArray(a, b) { 522 | for (var i = 0; i < a.length - 1; i++) { 523 | for (var j = 0; j < b.length - 1; j++) { 524 | if (vertexIntersectsVertex(a[i], a[i + 1], b[j], b[j + 1])) { 525 | return true; 526 | } 527 | } 528 | } 529 | 530 | return false; 531 | } 532 | 533 | function arrayIntersectsMultiArray(a, b) { 534 | for (var i = 0; i < b.length; i++) { 535 | var inner = b[i]; 536 | 537 | for (var j = 0; j < inner.length - 1; j++) { 538 | for (var k = 0; k < a.length - 1; k++) { 539 | if (vertexIntersectsVertex(inner[j], inner[j + 1], a[k], a[k + 1])) { 540 | return true; 541 | } 542 | } 543 | } 544 | } 545 | 546 | return false; 547 | } 548 | 549 | function multiArrayIntersectsMultiArray(a, b) { 550 | for (var i = 0; i < a.length; i++) { 551 | if (arrayIntersectsMultiArray(a[i], b)) { 552 | return true; 553 | } 554 | } 555 | 556 | return false; 557 | } 558 | 559 | function arrayIntersectsMultiMultiArray(a, b) { 560 | for (var i = 0; i < b.length; i++) { 561 | if (arrayIntersectsMultiArray(a, b[i])) { 562 | return true; 563 | } 564 | 565 | return false; 566 | } 567 | } 568 | 569 | function multiArrayIntersectsMultiMultiArray(a, b) { 570 | for (var i = 0; i < a.length; i++) { 571 | if (arrayIntersectsMultiMultiArray(a[i], b)) { 572 | return true; 573 | } 574 | 575 | return false; 576 | } 577 | } 578 | 579 | function multiMultiArrayIntersectsMultiMultiArray(a, b) { 580 | for (var i = 0; i < a.length; i++) { 581 | if (multiArrayIntersectsMultiMultiArray(a[i], b)) { 582 | return true; 583 | } 584 | 585 | return false; 586 | } 587 | } 588 | 589 | /* 590 | Internal: Returns a copy of coordinates for s closed polygon 591 | */ 592 | function closedPolygon(coordinates) { 593 | var outer = [ ]; 594 | 595 | for (var i = 0; i < coordinates.length; i++) { 596 | var inner = coordinates[i].slice(); 597 | if (pointsEqual(inner[0], inner[inner.length - 1]) === false) { 598 | inner.push(inner[0]); 599 | } 600 | 601 | outer.push(inner); 602 | } 603 | 604 | return outer; 605 | } 606 | 607 | function pointsEqual(a, b) { 608 | for (var i = 0; i < a.length; i++) { 609 | 610 | if (a[i] !== b[i]) { 611 | return false; 612 | } 613 | } 614 | 615 | return true; 616 | } 617 | 618 | function coordinatesEqual(a, b) { 619 | if (a.length !== b.length) { 620 | return false; 621 | } 622 | 623 | var na = a.slice().sort(compSort); 624 | var nb = b.slice().sort(compSort); 625 | 626 | for (var i = 0; i < na.length; i++) { 627 | if (na[i].length !== nb[i].length) { 628 | return false; 629 | } 630 | for (var j = 0; j < na.length; j++) { 631 | if (na[i][j] !== nb[i][j]) { 632 | return false; 633 | } 634 | } 635 | } 636 | 637 | return true; 638 | } 639 | 640 | /* 641 | Internal: An array of variables that will be excluded form JSON objects. 642 | */ 643 | var excludeFromJSON = ["length"]; 644 | 645 | /* 646 | Internal: Base GeoJSON Primitive 647 | */ 648 | function Primitive(geojson){ 649 | if(geojson){ 650 | switch (geojson.type) { 651 | case 'Point': 652 | return new Point(geojson); 653 | 654 | case 'MultiPoint': 655 | return new MultiPoint(geojson); 656 | 657 | case 'LineString': 658 | return new LineString(geojson); 659 | 660 | case 'MultiLineString': 661 | return new MultiLineString(geojson); 662 | 663 | case 'Polygon': 664 | return new Polygon(geojson); 665 | 666 | case 'MultiPolygon': 667 | return new MultiPolygon(geojson); 668 | 669 | case 'Feature': 670 | return new Feature(geojson); 671 | 672 | case 'FeatureCollection': 673 | return new FeatureCollection(geojson); 674 | 675 | case 'GeometryCollection': 676 | return new GeometryCollection(geojson); 677 | 678 | default: 679 | throw new Error("Unknown type: " + geojson.type); 680 | } 681 | } 682 | } 683 | 684 | Primitive.prototype.toMercator = function(){ 685 | return toMercator(this); 686 | }; 687 | 688 | Primitive.prototype.toGeographic = function(){ 689 | return toGeographic(this); 690 | }; 691 | 692 | Primitive.prototype.envelope = function(){ 693 | return calculateEnvelope(this); 694 | }; 695 | 696 | Primitive.prototype.bbox = function(){ 697 | return calculateBounds(this); 698 | }; 699 | 700 | Primitive.prototype.convexHull = function(){ 701 | var coordinates = [ ], i, j; 702 | if (this.type === 'Point') { 703 | return null; 704 | } else if (this.type === 'LineString' || this.type === 'MultiPoint') { 705 | if (this.coordinates && this.coordinates.length >= 3) { 706 | coordinates = this.coordinates; 707 | } else { 708 | return null; 709 | } 710 | } else if (this.type === 'Polygon' || this.type === 'MultiLineString') { 711 | if (this.coordinates && this.coordinates.length > 0) { 712 | for (i = 0; i < this.coordinates.length; i++) { 713 | coordinates = coordinates.concat(this.coordinates[i]); 714 | } 715 | if(coordinates.length < 3){ 716 | return null; 717 | } 718 | } else { 719 | return null; 720 | } 721 | } else if (this.type === 'MultiPolygon') { 722 | if (this.coordinates && this.coordinates.length > 0) { 723 | for (i = 0; i < this.coordinates.length; i++) { 724 | for (j = 0; j < this.coordinates[i].length; j++) { 725 | coordinates = coordinates.concat(this.coordinates[i][j]); 726 | } 727 | } 728 | if(coordinates.length < 3){ 729 | return null; 730 | } 731 | } else { 732 | return null; 733 | } 734 | } else if(this.type === "Feature"){ 735 | var primitive = new Primitive(this.geometry); 736 | return primitive.convexHull(); 737 | } 738 | 739 | return new Polygon({ 740 | type: 'Polygon', 741 | coordinates: closedPolygon([convexHull(coordinates)]) 742 | }); 743 | }; 744 | 745 | Primitive.prototype.toJSON = function(){ 746 | var obj = {}; 747 | for (var key in this) { 748 | if (this.hasOwnProperty(key) && excludeFromJSON.indexOf(key) === -1) { 749 | obj[key] = this[key]; 750 | } 751 | } 752 | obj.bbox = calculateBounds(this); 753 | return obj; 754 | }; 755 | 756 | Primitive.prototype.contains = function(primitive){ 757 | return new Primitive(primitive).within(this); 758 | }; 759 | 760 | Primitive.prototype.within = function(primitive) { 761 | var coordinates, i, contains; 762 | 763 | // point.within(point) :: equality 764 | if (primitive.type === "Point") { 765 | if (this.type === "Point") { 766 | return pointsEqual(this.coordinates, primitive.coordinates); 767 | 768 | } 769 | } 770 | 771 | // point.within(multilinestring) 772 | if (primitive.type === "MultiLineString") { 773 | if (this.type === "Point") { 774 | for (i = 0; i < primitive.coordinates.length; i++) { 775 | var linestring = { type: "LineString", coordinates: primitive.coordinates[i] }; 776 | 777 | if (this.within(linestring)) { 778 | return true; 779 | } 780 | } 781 | } 782 | } 783 | 784 | // point.within(linestring), point.within(multipoint) 785 | if (primitive.type === "LineString" || primitive.type === "MultiPoint") { 786 | if (this.type === "Point") { 787 | for (i = 0; i < primitive.coordinates.length; i++) { 788 | if (this.coordinates.length !== primitive.coordinates[i].length) { 789 | return false; 790 | } 791 | 792 | if (pointsEqual(this.coordinates, primitive.coordinates[i])) { 793 | return true; 794 | } 795 | } 796 | } 797 | } 798 | 799 | if (primitive.type === "Polygon") { 800 | // polygon.within(polygon) 801 | if (this.type === "Polygon") { 802 | // check for equal polygons 803 | if (primitive.coordinates.length === this.coordinates.length) { 804 | for (i = 0; i < this.coordinates.length; i++) { 805 | if (coordinatesEqual(this.coordinates[i], primitive.coordinates[i])) { 806 | return true; 807 | } 808 | } 809 | } 810 | 811 | if (this.coordinates.length && polygonContainsPoint(primitive.coordinates, this.coordinates[0][0])) { 812 | return !multiArrayIntersectsMultiArray(closedPolygon(this.coordinates), closedPolygon(primitive.coordinates)); 813 | } else { 814 | return false; 815 | } 816 | 817 | // point.within(polygon) 818 | } else if (this.type === "Point") { 819 | return polygonContainsPoint(primitive.coordinates, this.coordinates); 820 | 821 | // linestring/multipoint withing polygon 822 | } else if (this.type === "LineString" || this.type === "MultiPoint") { 823 | if (!this.coordinates || this.coordinates.length === 0) { 824 | return false; 825 | } 826 | 827 | for (i = 0; i < this.coordinates.length; i++) { 828 | if (polygonContainsPoint(primitive.coordinates, this.coordinates[i]) === false) { 829 | return false; 830 | } 831 | } 832 | 833 | return true; 834 | 835 | // multilinestring.within(polygon) 836 | } else if (this.type === "MultiLineString") { 837 | for (i = 0; i < this.coordinates.length; i++) { 838 | var ls = new LineString(this.coordinates[i]); 839 | 840 | if (ls.within(primitive) === false) { 841 | contains++; 842 | return false; 843 | } 844 | } 845 | 846 | return true; 847 | 848 | // multipolygon.within(polygon) 849 | } else if (this.type === "MultiPolygon") { 850 | for (i = 0; i < this.coordinates.length; i++) { 851 | var p1 = new Primitive({ type: "Polygon", coordinates: this.coordinates[i] }); 852 | 853 | if (p1.within(primitive) === false) { 854 | return false; 855 | } 856 | } 857 | 858 | return true; 859 | } 860 | 861 | } 862 | 863 | if (primitive.type === "MultiPolygon") { 864 | // point.within(multipolygon) 865 | if (this.type === "Point") { 866 | if (primitive.coordinates.length) { 867 | for (i = 0; i < primitive.coordinates.length; i++) { 868 | coordinates = primitive.coordinates[i]; 869 | if (polygonContainsPoint(coordinates, this.coordinates) && multiArrayIntersectsMultiArray(this.coordinates, primitive.coordinates) === false) { 870 | return true; 871 | } 872 | } 873 | } 874 | 875 | return false; 876 | // polygon.within(multipolygon) 877 | } else if (this.type === "Polygon") { 878 | for (i = 0; i < this.coordinates.length; i++) { 879 | if (primitive.coordinates[i].length === this.coordinates.length) { 880 | for (j = 0; j < this.coordinates.length; j++) { 881 | if (coordinatesEqual(this.coordinates[j], primitive.coordinates[i][j])) { 882 | return true; 883 | } 884 | } 885 | } 886 | } 887 | 888 | if (multiArrayIntersectsMultiMultiArray(this.coordinates, primitive.coordinates) === false) { 889 | if (primitive.coordinates.length) { 890 | for (i = 0; i < primitive.coordinates.length; i++) { 891 | coordinates = primitive.coordinates[i]; 892 | if (polygonContainsPoint(coordinates, this.coordinates[0][0]) === false) { 893 | contains = false; 894 | } else { 895 | contains = true; 896 | } 897 | } 898 | 899 | return contains; 900 | } 901 | } 902 | 903 | // linestring.within(multipolygon), multipoint.within(multipolygon) 904 | } else if (this.type === "LineString" || this.type === "MultiPoint") { 905 | for (i = 0; i < primitive.coordinates.length; i++) { 906 | var p = { type: "Polygon", coordinates: primitive.coordinates[i] }; 907 | 908 | if (this.within(p)) { 909 | return true; 910 | } 911 | 912 | return false; 913 | } 914 | 915 | // multilinestring.within(multipolygon) 916 | } else if (this.type === "MultiLineString") { 917 | for (i = 0; i < this.coordinates.length; i++) { 918 | var lines = new LineString(this.coordinates[i]); 919 | 920 | if (lines.within(primitive) === false) { 921 | return false; 922 | } 923 | } 924 | 925 | return true; 926 | 927 | // multipolygon.within(multipolygon) 928 | } else if (this.type === "MultiPolygon") { 929 | for (i = 0; i < primitive.coordinates.length; i++) { 930 | var mpoly = { type: "Polygon", coordinates: primitive.coordinates[i] }; 931 | 932 | if (this.within(mpoly) === false) { 933 | return false; 934 | } 935 | } 936 | 937 | return true; 938 | } 939 | } 940 | 941 | // default to false 942 | return false; 943 | }; 944 | 945 | Primitive.prototype.intersects = function(primitive) { 946 | // if we are passed a feature, use the polygon inside instead 947 | if (primitive.type === 'Feature') { 948 | primitive = primitive.geometry; 949 | } 950 | 951 | var p = new Primitive(primitive); 952 | if (this.within(primitive) || p.within(this)) { 953 | return true; 954 | } 955 | 956 | if (this.type === 'LineString') { 957 | if (primitive.type === 'LineString') { 958 | return arrayIntersectsArray(this.coordinates, primitive.coordinates); 959 | } else if (primitive.type === 'MultiLineString') { 960 | return arrayIntersectsMultiArray(this.coordinates, primitive.coordinates); 961 | } else if (primitive.type === 'Polygon') { 962 | return arrayIntersectsMultiArray(this.coordinates, closedPolygon(primitive.coordinates)); 963 | } else if (primitive.type === 'MultiPolygon') { 964 | return arrayIntersectsMultiMultiArray(this.coordinates, primitive.coordinates); 965 | } 966 | } else if (this.type === 'MultiLineString') { 967 | if (primitive.type === 'LineString') { 968 | return arrayIntersectsMultiArray(primitive.coordinates, this.coordinates); 969 | } else if (primitive.type === 'Polygon' || primitive.type === 'MultiLineString') { 970 | return multiArrayIntersectsMultiArray(this.coordinates, primitive.coordinates); 971 | } else if (primitive.type === 'MultiPolygon') { 972 | return multiArrayIntersectsMultiMultiArray(this.coordinates, primitive.coordinates); 973 | } 974 | } else if (this.type === 'Polygon') { 975 | if (primitive.type === 'LineString') { 976 | return arrayIntersectsMultiArray(primitive.coordinates, closedPolygon(this.coordinates)); 977 | } else if (primitive.type === 'MultiLineString') { 978 | return multiArrayIntersectsMultiArray(closedPolygon(this.coordinates), primitive.coordinates); 979 | } else if (primitive.type === 'Polygon') { 980 | return multiArrayIntersectsMultiArray(closedPolygon(this.coordinates), closedPolygon(primitive.coordinates)); 981 | } else if (primitive.type === 'MultiPolygon') { 982 | return multiArrayIntersectsMultiMultiArray(closedPolygon(this.coordinates), primitive.coordinates); 983 | } 984 | } else if (this.type === 'MultiPolygon') { 985 | if (primitive.type === 'LineString') { 986 | return arrayIntersectsMultiMultiArray(primitive.coordinates, this.coordinates); 987 | } else if (primitive.type === 'Polygon' || primitive.type === 'MultiLineString') { 988 | return multiArrayIntersectsMultiMultiArray(closedPolygon(primitive.coordinates), this.coordinates); 989 | } else if (primitive.type === 'MultiPolygon') { 990 | return multiMultiArrayIntersectsMultiMultiArray(this.coordinates, primitive.coordinates); 991 | } 992 | } else if (this.type === 'Feature') { 993 | // in the case of a Feature, use the internal primitive for intersection 994 | var inner = new Primitive(this.geometry); 995 | return inner.intersects(primitive); 996 | } 997 | 998 | warn("Type " + this.type + " to " + primitive.type + " intersection is not supported by intersects"); 999 | return false; 1000 | }; 1001 | 1002 | 1003 | /* 1004 | GeoJSON Point Class 1005 | new Point(); 1006 | new Point(x,y,z,wtf); 1007 | new Point([x,y,z,wtf]); 1008 | new Point([x,y]); 1009 | new Point({ 1010 | type: "Point", 1011 | coordinates: [x,y] 1012 | }); 1013 | */ 1014 | function Point(input){ 1015 | var args = Array.prototype.slice.call(arguments); 1016 | 1017 | if(input && input.type === "Point" && input.coordinates){ 1018 | extend(this, input); 1019 | } else if(input && isArray(input)) { 1020 | this.coordinates = input; 1021 | } else if(args.length >= 2) { 1022 | this.coordinates = args; 1023 | } else { 1024 | throw "Terraformer: invalid input for Terraformer.Point"; 1025 | } 1026 | 1027 | this.type = "Point"; 1028 | } 1029 | 1030 | Point.prototype = new Primitive(); 1031 | Point.prototype.constructor = Point; 1032 | 1033 | /* 1034 | GeoJSON MultiPoint Class 1035 | new MultiPoint(); 1036 | new MultiPoint([[x,y], [x1,y1]]); 1037 | new MultiPoint({ 1038 | type: "MultiPoint", 1039 | coordinates: [x,y] 1040 | }); 1041 | */ 1042 | function MultiPoint(input){ 1043 | if(input && input.type === "MultiPoint" && input.coordinates){ 1044 | extend(this, input); 1045 | } else if(isArray(input)) { 1046 | this.coordinates = input; 1047 | } else { 1048 | throw "Terraformer: invalid input for Terraformer.MultiPoint"; 1049 | } 1050 | 1051 | this.type = "MultiPoint"; 1052 | } 1053 | 1054 | MultiPoint.prototype = new Primitive(); 1055 | MultiPoint.prototype.constructor = MultiPoint; 1056 | MultiPoint.prototype.forEach = function(func){ 1057 | for (var i = 0; i < this.coordinates.length; i++) { 1058 | func.apply(this, [this.coordinates[i], i, this.coordinates]); 1059 | } 1060 | return this; 1061 | }; 1062 | MultiPoint.prototype.addPoint = function(point){ 1063 | this.coordinates.push(point); 1064 | return this; 1065 | }; 1066 | MultiPoint.prototype.insertPoint = function(point, index){ 1067 | this.coordinates.splice(index, 0, point); 1068 | return this; 1069 | }; 1070 | MultiPoint.prototype.removePoint = function(remove){ 1071 | if(typeof remove === "number"){ 1072 | this.coordinates.splice(remove, 1); 1073 | } else { 1074 | this.coordinates.splice(this.coordinates.indexOf(remove), 1); 1075 | } 1076 | return this; 1077 | }; 1078 | MultiPoint.prototype.get = function(i){ 1079 | return new Point(this.coordinates[i]); 1080 | }; 1081 | 1082 | /* 1083 | GeoJSON LineString Class 1084 | new LineString(); 1085 | new LineString([[x,y], [x1,y1]]); 1086 | new LineString({ 1087 | type: "LineString", 1088 | coordinates: [x,y] 1089 | }); 1090 | */ 1091 | function LineString(input){ 1092 | if(input && input.type === "LineString" && input.coordinates){ 1093 | extend(this, input); 1094 | } else if(isArray(input)) { 1095 | this.coordinates = input; 1096 | } else { 1097 | throw "Terraformer: invalid input for Terraformer.LineString"; 1098 | } 1099 | 1100 | this.type = "LineString"; 1101 | } 1102 | 1103 | LineString.prototype = new Primitive(); 1104 | LineString.prototype.constructor = LineString; 1105 | LineString.prototype.addVertex = function(point){ 1106 | this.coordinates.push(point); 1107 | return this; 1108 | }; 1109 | LineString.prototype.insertVertex = function(point, index){ 1110 | this.coordinates.splice(index, 0, point); 1111 | return this; 1112 | }; 1113 | LineString.prototype.removeVertex = function(remove){ 1114 | this.coordinates.splice(remove, 1); 1115 | return this; 1116 | }; 1117 | 1118 | /* 1119 | GeoJSON MultiLineString Class 1120 | new MultiLineString(); 1121 | new MultiLineString([ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ]); 1122 | new MultiLineString({ 1123 | type: "MultiLineString", 1124 | coordinates: [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] 1125 | }); 1126 | */ 1127 | function MultiLineString(input){ 1128 | if(input && input.type === "MultiLineString" && input.coordinates){ 1129 | extend(this, input); 1130 | } else if(isArray(input)) { 1131 | this.coordinates = input; 1132 | } else { 1133 | throw "Terraformer: invalid input for Terraformer.MultiLineString"; 1134 | } 1135 | 1136 | this.type = "MultiLineString"; 1137 | } 1138 | 1139 | MultiLineString.prototype = new Primitive(); 1140 | MultiLineString.prototype.constructor = MultiLineString; 1141 | MultiLineString.prototype.forEach = function(func){ 1142 | for (var i = 0; i < this.coordinates.length; i++) { 1143 | func.apply(this, [this.coordinates[i], i, this.coordinates ]); 1144 | } 1145 | }; 1146 | MultiLineString.prototype.get = function(i){ 1147 | return new LineString(this.coordinates[i]); 1148 | }; 1149 | 1150 | /* 1151 | GeoJSON Polygon Class 1152 | new Polygon(); 1153 | new Polygon([ [[x,y], [x1,y1], [x2,y2]] ]); 1154 | new Polygon({ 1155 | type: "Polygon", 1156 | coordinates: [ [[x,y], [x1,y1], [x2,y2]] ] 1157 | }); 1158 | */ 1159 | function Polygon(input){ 1160 | if(input && input.type === "Polygon" && input.coordinates){ 1161 | extend(this, input); 1162 | } else if(isArray(input)) { 1163 | this.coordinates = input; 1164 | } else { 1165 | throw "Terraformer: invalid input for Terraformer.Polygon"; 1166 | } 1167 | 1168 | this.type = "Polygon"; 1169 | } 1170 | 1171 | Polygon.prototype = new Primitive(); 1172 | Polygon.prototype.constructor = Polygon; 1173 | Polygon.prototype.addVertex = function(point){ 1174 | this.coordinates[0].push(point); 1175 | return this; 1176 | }; 1177 | Polygon.prototype.insertVertex = function(point, index){ 1178 | this.coordinates[0].splice(index, 0, point); 1179 | return this; 1180 | }; 1181 | Polygon.prototype.removeVertex = function(remove){ 1182 | this.coordinates[0].splice(remove, 1); 1183 | return this; 1184 | }; 1185 | Polygon.prototype.close = function() { 1186 | this.coordinates = closedPolygon(this.coordinates); 1187 | }; 1188 | 1189 | /* 1190 | GeoJSON MultiPolygon Class 1191 | new MultiPolygon(); 1192 | new MultiPolygon([ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ]); 1193 | new MultiPolygon({ 1194 | type: "MultiPolygon", 1195 | coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] 1196 | }); 1197 | */ 1198 | function MultiPolygon(input){ 1199 | if(input && input.type === "MultiPolygon" && input.coordinates){ 1200 | extend(this, input); 1201 | } else if(isArray(input)) { 1202 | this.coordinates = input; 1203 | } else { 1204 | throw "Terraformer: invalid input for Terraformer.MultiPolygon"; 1205 | } 1206 | 1207 | this.type = "MultiPolygon"; 1208 | } 1209 | 1210 | MultiPolygon.prototype = new Primitive(); 1211 | MultiPolygon.prototype.constructor = MultiPolygon; 1212 | MultiPolygon.prototype.forEach = function(func){ 1213 | for (var i = 0; i < this.coordinates.length; i++) { 1214 | func.apply(this, [this.coordinates[i], i, this.coordinates ]); 1215 | } 1216 | }; 1217 | MultiPolygon.prototype.get = function(i){ 1218 | return new Polygon(this.coordinates[i]); 1219 | }; 1220 | MultiPolygon.prototype.close = function(){ 1221 | var outer = []; 1222 | this.forEach(function(polygon){ 1223 | outer.push(closedPolygon(polygon)); 1224 | }); 1225 | this.coordinates = outer; 1226 | return this; 1227 | }; 1228 | 1229 | /* 1230 | GeoJSON Feature Class 1231 | new Feature(); 1232 | new Feature({ 1233 | type: "Feature", 1234 | geometry: { 1235 | type: "Polygon", 1236 | coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] 1237 | } 1238 | }); 1239 | new Feature({ 1240 | type: "Polygon", 1241 | coordinates: [ [ [[x,y], [x1,y1]], [[x2,y2], [x3,y3]] ] ] 1242 | }); 1243 | */ 1244 | function Feature(input){ 1245 | if(input && input.type === "Feature"){ 1246 | extend(this, input); 1247 | } else if(input && input.type && input.coordinates) { 1248 | this.geometry = input; 1249 | } else { 1250 | throw "Terraformer: invalid input for Terraformer.Feature"; 1251 | } 1252 | 1253 | this.type = "Feature"; 1254 | } 1255 | 1256 | Feature.prototype = new Primitive(); 1257 | Feature.prototype.constructor = Feature; 1258 | 1259 | /* 1260 | GeoJSON FeatureCollection Class 1261 | new FeatureCollection(); 1262 | new FeatureCollection([feature, feature1]); 1263 | new FeatureCollection({ 1264 | type: "FeatureCollection", 1265 | coordinates: [feature, feature1] 1266 | }); 1267 | */ 1268 | function FeatureCollection(input){ 1269 | if(input && input.type === "FeatureCollection" && input.features){ 1270 | extend(this, input); 1271 | } else if(isArray(input)) { 1272 | this.features = input; 1273 | } else { 1274 | throw "Terraformer: invalid input for Terraformer.FeatureCollection"; 1275 | } 1276 | 1277 | this.type = "FeatureCollection"; 1278 | } 1279 | 1280 | FeatureCollection.prototype = new Primitive(); 1281 | FeatureCollection.prototype.constructor = FeatureCollection; 1282 | FeatureCollection.prototype.forEach = function(func){ 1283 | for (var i = 0; i < this.features.length; i++) { 1284 | func.apply(this, [this.features[i], i, this.features]); 1285 | } 1286 | }; 1287 | FeatureCollection.prototype.get = function(id){ 1288 | var found; 1289 | this.forEach(function(feature){ 1290 | if(feature.id === id){ 1291 | found = feature; 1292 | } 1293 | }); 1294 | return new Feature(found); 1295 | }; 1296 | 1297 | /* 1298 | GeoJSON GeometryCollection Class 1299 | new GeometryCollection(); 1300 | new GeometryCollection([geometry, geometry1]); 1301 | new GeometryCollection({ 1302 | type: "GeometryCollection", 1303 | coordinates: [geometry, geometry1] 1304 | }); 1305 | */ 1306 | function GeometryCollection(input){ 1307 | if(input && input.type === "GeometryCollection" && input.geometries){ 1308 | extend(this, input); 1309 | } else if(isArray(input)) { 1310 | this.geometries = input; 1311 | } else if(input.coordinates && input.type){ 1312 | this.type = "GeometryCollection"; 1313 | this.geometries = [input]; 1314 | } else { 1315 | throw "Terraformer: invalid input for Terraformer.GeometryCollection"; 1316 | } 1317 | 1318 | this.type = "GeometryCollection"; 1319 | } 1320 | 1321 | GeometryCollection.prototype = new Primitive(); 1322 | GeometryCollection.prototype.constructor = GeometryCollection; 1323 | GeometryCollection.prototype.forEach = function(func){ 1324 | for (var i = 0; i < this.geometries.length; i++) { 1325 | func.apply(this, [this.geometries[i], i, this.geometries]); 1326 | } 1327 | }; 1328 | GeometryCollection.prototype.get = function(i){ 1329 | return new Primitive(this.geometries[i]); 1330 | }; 1331 | 1332 | function createCircle(center, radius, interpolate){ 1333 | var mercatorPosition = positionToMercator(center); 1334 | var steps = interpolate || 64; 1335 | var polygon = { 1336 | type: "Polygon", 1337 | coordinates: [[]] 1338 | }; 1339 | for(var i=1; i<=steps; i++) { 1340 | var radians = i * (360/steps) * Math.PI / 180; 1341 | polygon.coordinates[0].push([mercatorPosition[0] + radius * Math.cos(radians), mercatorPosition[1] + radius * Math.sin(radians)]); 1342 | } 1343 | polygon.coordinates = closedPolygon(polygon.coordinates); 1344 | 1345 | return toGeographic(polygon); 1346 | } 1347 | 1348 | function Circle (center, radius, interpolate) { 1349 | var steps = interpolate || 64; 1350 | var rad = radius || 250; 1351 | 1352 | if(!center || center.length < 2 || !rad || !steps) { 1353 | throw new Error("Terraformer: missing parameter for Terraformer.Circle"); 1354 | } 1355 | 1356 | extend(this, new Feature({ 1357 | type: "Feature", 1358 | geometry: createCircle(center, rad, steps), 1359 | properties: { 1360 | radius: rad, 1361 | center: center, 1362 | steps: steps 1363 | } 1364 | })); 1365 | } 1366 | 1367 | Circle.prototype = new Primitive(); 1368 | Circle.prototype.constructor = Circle; 1369 | Circle.prototype.recalculate = function(){ 1370 | this.geometry = createCircle(this.properties.center, this.properties.radius, this.properties.steps); 1371 | return this; 1372 | }; 1373 | Circle.prototype.center = function(coordinates){ 1374 | if(coordinates){ 1375 | this.properties.center = coordinates; 1376 | this.recalculate(); 1377 | } 1378 | return this.properties.center; 1379 | }; 1380 | Circle.prototype.radius = function(radius){ 1381 | if(radius){ 1382 | this.properties.radius = radius; 1383 | this.recalculate(); 1384 | } 1385 | return this.properties.radius; 1386 | }; 1387 | Circle.prototype.steps = function(steps){ 1388 | if(steps){ 1389 | this.properties.steps = steps; 1390 | this.recalculate(); 1391 | } 1392 | return this.properties.steps; 1393 | }; 1394 | 1395 | Circle.prototype.toJSON = function() { 1396 | var output = Primitive.prototype.toJSON.call(this); 1397 | return output; 1398 | }; 1399 | 1400 | exports.Primitive = Primitive; 1401 | exports.Point = Point; 1402 | exports.MultiPoint = MultiPoint; 1403 | exports.LineString = LineString; 1404 | exports.MultiLineString = MultiLineString; 1405 | exports.Polygon = Polygon; 1406 | exports.MultiPolygon = MultiPolygon; 1407 | exports.Feature = Feature; 1408 | exports.FeatureCollection = FeatureCollection; 1409 | exports.GeometryCollection = GeometryCollection; 1410 | exports.Circle = Circle; 1411 | 1412 | exports.toMercator = toMercator; 1413 | exports.toGeographic = toGeographic; 1414 | 1415 | exports.Tools = {}; 1416 | exports.Tools.positionToMercator = positionToMercator; 1417 | exports.Tools.positionToGeographic = positionToGeographic; 1418 | exports.Tools.applyConverter = applyConverter; 1419 | exports.Tools.toMercator = toMercator; 1420 | exports.Tools.toGeographic = toGeographic; 1421 | exports.Tools.createCircle = createCircle; 1422 | 1423 | exports.Tools.calculateBounds = calculateBounds; 1424 | exports.Tools.calculateEnvelope = calculateEnvelope; 1425 | 1426 | exports.Tools.coordinatesContainPoint = coordinatesContainPoint; 1427 | exports.Tools.polygonContainsPoint = polygonContainsPoint; 1428 | exports.Tools.arrayIntersectsArray = arrayIntersectsArray; 1429 | exports.Tools.coordinatesContainPoint = coordinatesContainPoint; 1430 | exports.Tools.coordinatesEqual = coordinatesEqual; 1431 | exports.Tools.convexHull = convexHull; 1432 | 1433 | exports.MercatorCRS = MercatorCRS; 1434 | exports.GeographicCRS = GeographicCRS; 1435 | 1436 | return exports; 1437 | })); 1438 | -------------------------------------------------------------------------------- /data/dc-schools.json: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection","features":[{"type":"Feature","id":"1","geometry":{"type":"Point","coordinates":[-77.06861620212666,38.91551648717705]},"properties":{"OBJECTID":1,"NAME":"Fillmore Arts Center (West)","ADDRESS":"1819 35TH STREET NW","FACUSE":"Arts Center","LEVEL_":"AC","STATUS":"Active","PHONE":"202-729-3796","UNGRADED":0,"TOTAL_STUD":0,"SSL":" ","GIS_ID":"dcps_923","WEB_URL":"http://www.fillmoreartscenter.org/","ADDR_ID":274432,"BLDG_NUM":0,"SCH_PROG":"0","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":394049.46,"Y":138629.13,"ADDRID":274432,"ZIP_CODE":20007}},{"type":"Feature","id":"10","geometry":{"type":"Point","coordinates":[-77.07008151775702,38.95294098491906]},"properties":{"OBJECTID":10,"NAME":"Murch Elementary School","ADDRESS":"4810 36TH STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-282-0130","UNGRADED":null,"TOTAL_STUD":556,"SSL":" ","GIS_ID":"dcps_287","WEB_URL":"http://www.murchschool.org","ADDR_ID":294602,"BLDG_NUM":287,"SCH_PROG":"287","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":393925.57,"Y":142783.67,"ADDRID":294602,"ZIP_CODE":20008}},{"type":"Feature","id":"100","geometry":{"type":"Point","coordinates":[-76.98307953050461,38.87009150762566]},"properties":{"OBJECTID":100,"NAME":"Anacostia High School","ADDRESS":"1601 16TH STREET SE","FACUSE":"High School","LEVEL_":"SHS","STATUS":"Active","PHONE":"202-698-2155","UNGRADED":null,"TOTAL_STUD":784,"SSL":" ","GIS_ID":"dcps_450","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":155922,"BLDG_NUM":450,"SCH_PROG":"450","CAPITALGAINS":"N","CAPACITY":1040,"YEAR_BUILT":1935,"SQUARE_FOOTAGE":247900,"POPULATION_PLAN":1100,"POPULATION_ENROLLED_2008":835,"X":401468.56,"Y":133584.5,"ADDRID":155922,"ZIP_CODE":20020}},{"type":"Feature","id":"101","geometry":{"type":"Point","coordinates":[-76.98370595672756,38.85134435056086]},"properties":{"OBJECTID":101,"NAME":"Johnson Middle School","ADDRESS":"1400 BRUCE PLACE SE","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-939-3140","UNGRADED":0,"TOTAL_STUD":252,"SSL":" ","GIS_ID":"dcps_416","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294520,"BLDG_NUM":416,"SCH_PROG":"416","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1969,"SQUARE_FOOTAGE":277000,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":401414.57,"Y":131503.42,"ADDRID":294520,"ZIP_CODE":20020}},{"type":"Feature","id":"102","geometry":{"type":"Point","coordinates":[-77.02488475847085,38.91062615117742]},"properties":{"OBJECTID":102,"NAME":"Seaton Elementary School","ADDRESS":"1503 10TH STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-673-7215","UNGRADED":null,"TOTAL_STUD":265,"SSL":" ","GIS_ID":"dcps_309","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":279203,"BLDG_NUM":309,"SCH_PROG":"309","CAPITALGAINS":"N","CAPACITY":428,"YEAR_BUILT":1969,"SQUARE_FOOTAGE":65000,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":311,"X":397841.92,"Y":138084.32,"ADDRID":279203,"ZIP_CODE":20001}},{"type":"Feature","id":"103","geometry":{"type":"Point","coordinates":[-77.02777863575504,38.943615972158675]},"properties":{"OBJECTID":103,"NAME":"Roosevelt STAY High School","ADDRESS":"4400 IOWA AVENUE NW","FACUSE":"Youth Engagement","LEVEL_":"STAY","STATUS":"Active","PHONE":"202-576-8399","UNGRADED":497,"TOTAL_STUD":497,"SSL":" ","GIS_ID":"dcps_913","WEB_URL":"http://www.dcps.dc.gov/DCPS/RSTAY","ADDR_ID":252605,"BLDG_NUM":459,"SCH_PROG":"459A","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":397592.04000000004,"Y":141746.55000000002,"ADDRID":294595,"ZIP_CODE":20011}},{"type":"Feature","id":"104","geometry":{"type":"Point","coordinates":[-76.9885030510634,38.90412519953248]},"properties":{"OBJECTID":104,"NAME":"Wheatley Education Campus","ADDRESS":"1299 NEAL STREET NE","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-939-5970","UNGRADED":null,"TOTAL_STUD":475,"SSL":" ","GIS_ID":"dcps_335","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294512,"BLDG_NUM":335,"SCH_PROG":"335","CAPITALGAINS":"N","CAPACITY":625,"YEAR_BUILT":1960,"SQUARE_FOOTAGE":103700,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":327,"X":400997.43,"Y":137362.43,"ADDRID":294512,"ZIP_CODE":20002}},{"type":"Feature","id":"105","geometry":{"type":"Point","coordinates":[-77.00722725374621,38.95252090264419]},"properties":{"OBJECTID":105,"NAME":"Mamie D. Lee School","ADDRESS":"100 GALLATIN STREET NE","FACUSE":"Special Education School","LEVEL_":"SE","STATUS":"Active","PHONE":"202-576-6090","UNGRADED":90,"TOTAL_STUD":90,"SSL":" ","GIS_ID":"dcps_265","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294470,"BLDG_NUM":465,"SCH_PROG":"465","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1971,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":399373.74,"Y":142734.73,"ADDRID":294470,"ZIP_CODE":20011}},{"type":"Feature","id":"106","geometry":{"type":"Point","coordinates":[-76.99184516681355,38.92518543949811]},"properties":{"OBJECTID":106,"NAME":"Noyes Education Campus","ADDRESS":"2725 10TH STREET NE","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-281-2580","UNGRADED":null,"TOTAL_STUD":352,"SSL":" ","GIS_ID":"dcps_290","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":289594,"BLDG_NUM":290,"SCH_PROG":"290","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":400707.33,"Y":139700.26,"ADDRID":289594,"ZIP_CODE":20018}},{"type":"Feature","id":"107","geometry":{"type":"Point","coordinates":[-77.05720567559382,38.92360328286345]},"properties":{"OBJECTID":107,"NAME":"Oyster-Adams Bilingual School (Oyster)","ADDRESS":"2801 CALVERT STREET NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-671-6130","UNGRADED":0,"TOTAL_STUD":355,"SSL":" ","GIS_ID":"dcps_292","WEB_URL":"http://www.oysterbilingualschool.com/","ADDR_ID":275944,"BLDG_NUM":292,"SCH_PROG":"292","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":395039.60000000003,"Y":139526.15,"ADDRID":275944,"ZIP_CODE":20008}},{"type":"Feature","id":"108","geometry":{"type":"Point","coordinates":[-77.0239792607167,38.92384021287527]},"properties":{"OBJECTID":108,"NAME":"Benjamin Banneker High School","ADDRESS":"800 EUCLID STREET NW","FACUSE":"High School/Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-671-6320","UNGRADED":0,"TOTAL_STUD":413,"SSL":" ","GIS_ID":"dcps_402","WEB_URL":"http://www.benjaminbanneker.org/","ADDR_ID":294496,"BLDG_NUM":402,"SCH_PROG":"402","CAPITALGAINS":"N","CAPACITY":620,"YEAR_BUILT":1939,"SQUARE_FOOTAGE":180000,"POPULATION_PLAN":500,"POPULATION_ENROLLED_2008":391,"X":397920.84,"Y":139551.17,"ADDRID":294496,"ZIP_CODE":20001}},{"type":"Feature","id":"109","geometry":{"type":"Point","coordinates":[-77.02291294981048,38.879878381785296]},"properties":{"OBJECTID":109,"NAME":"Jefferson Middle School","ADDRESS":"801 7TH STREET SW","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-729-3270","UNGRADED":null,"TOTAL_STUD":174,"SSL":" ","GIS_ID":"dcps_415","WEB_URL":"http://www.k12.dc.us/schools/Jefferson/","ADDR_ID":276812,"BLDG_NUM":415,"SCH_PROG":"415","CAPITALGAINS":"Y","CAPACITY":900,"YEAR_BUILT":1940,"SQUARE_FOOTAGE":109000,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":408,"X":398012.08,"Y":134671.03,"ADDRID":276812,"ZIP_CODE":20024}},{"type":"Feature","id":"11","geometry":{"type":"Point","coordinates":[-77.0146961497148,38.9085310046647]},"properties":{"OBJECTID":11,"NAME":"Dunbar High School","ADDRESS":"1301 NEW JERSEY AVENUE NW","FACUSE":"High School","LEVEL_":"SHS","STATUS":"Active","PHONE":"202-698-3762","UNGRADED":null,"TOTAL_STUD":514,"SSL":" ","GIS_ID":"dcps_467","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":279021,"BLDG_NUM":467,"SCH_PROG":"940","CAPITALGAINS":"N","CAPACITY":1095,"YEAR_BUILT":1977,"SQUARE_FOOTAGE":343400,"POPULATION_PLAN":1600,"POPULATION_ENROLLED_2008":973,"X":398725.55,"Y":137851.55,"ADDRID":279021,"ZIP_CODE":20001}},{"type":"Feature","id":"110","geometry":{"type":"Point","coordinates":[-76.92446143985119,38.90057322205526]},"properties":{"OBJECTID":110,"NAME":"Burrville Elementary School","ADDRESS":"801 DIVISION AVENUE NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6020","UNGRADED":null,"TOTAL_STUD":368,"SSL":" ","GIS_ID":"dcps_221","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":289787,"BLDG_NUM":221,"SCH_PROG":"221","CAPITALGAINS":"N","CAPACITY":322,"YEAR_BUILT":1980,"SQUARE_FOOTAGE":95000,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":424,"X":406552.65,"Y":136970.78,"ADDRID":289787,"ZIP_CODE":20019}},{"type":"Feature","id":"111","geometry":{"type":"Point","coordinates":[-76.97066933279865,38.90260633790191]},"properties":{"OBJECTID":111,"NAME":"Browne Education Campus","ADDRESS":"850 26TH STREET NE","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-671-6210","UNGRADED":null,"TOTAL_STUD":384,"SSL":" ","GIS_ID":"dcps_404","WEB_URL":"http://www.dcps.dc.gov/DCPS/browne","ADDR_ID":294501,"BLDG_NUM":404,"SCH_PROG":"404","CAPITALGAINS":"Y","CAPACITY":835,"YEAR_BUILT":1932,"SQUARE_FOOTAGE":215400,"POPULATION_PLAN":750,"POPULATION_ENROLLED_2008":211,"X":402544.36,"Y":137194.17,"ADDRID":294501,"ZIP_CODE":20002}},{"type":"Feature","id":"112","geometry":{"type":"Point","coordinates":[-77.02643495398235,38.935818665270325]},"properties":{"OBJECTID":112,"NAME":"Raymond Education Campus","ADDRESS":"915 SPRING ROAD NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-576-6236","UNGRADED":null,"TOTAL_STUD":442,"SSL":" ","GIS_ID":"dcps_302","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":226682,"BLDG_NUM":302,"SCH_PROG":"302","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":397708.28,"Y":140880.94,"ADDRID":226682,"ZIP_CODE":20010}},{"type":"Feature","id":"113","geometry":{"type":"Point","coordinates":[-77.10052963425032,38.92680929350779]},"properties":{"OBJECTID":113,"NAME":"Key Elementary School","ADDRESS":"5001 DANA PLACE NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-729-3280","UNGRADED":null,"TOTAL_STUD":386,"SSL":" ","GIS_ID":"dcps_272","WEB_URL":"http://www.keyschooldc.org","ADDR_ID":294605,"BLDG_NUM":272,"SCH_PROG":"272","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1929,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":391283.15,"Y":139885.29,"ADDRID":294605,"ZIP_CODE":20016}},{"type":"Feature","id":"114","geometry":{"type":"Point","coordinates":[-77.0014621329234,38.88480865948608]},"properties":{"OBJECTID":114,"NAME":"Brent Elementary School","ADDRESS":"301 NORTH CAROLINA AVENUE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-3363","UNGRADED":null,"TOTAL_STUD":347,"SSL":" ","GIS_ID":"dcps_212","WEB_URL":"http://www.brentelementary.org","ADDR_ID":294479,"BLDG_NUM":212,"SCH_PROG":"212","CAPITALGAINS":"N","CAPACITY":276,"YEAR_BUILT":1968,"SQUARE_FOOTAGE":47500,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":203,"X":399873.34,"Y":135218.08000000002,"ADDRID":294479,"ZIP_CODE":20003}},{"type":"Feature","id":"115","geometry":{"type":"Point","coordinates":[-77.06582344448879,38.93273453023924]},"properties":{"OBJECTID":115,"NAME":"Eaton Elementary School","ADDRESS":"3301 LOWELL STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-282-0103","UNGRADED":null,"TOTAL_STUD":457,"SSL":" ","GIS_ID":"dcps_232","WEB_URL":"http://www.eatondc.org/","ADDR_ID":294562,"BLDG_NUM":232,"SCH_PROG":"232","CAPITALGAINS":"N","CAPACITY":418,"YEAR_BUILT":1911,"SQUARE_FOOTAGE":49100,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":412,"X":394293.04000000004,"Y":140540.30000000002,"ADDRID":294562,"ZIP_CODE":20008}},{"type":"Feature","id":"116","geometry":{"type":"Point","coordinates":[-76.95757497661059,38.88309054194811]},"properties":{"OBJECTID":116,"NAME":"Kimball Elementary School","ADDRESS":"3375 MINNESOTA AVENUE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6260","UNGRADED":null,"TOTAL_STUD":313,"SSL":" ","GIS_ID":"dcps_259","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294565,"BLDG_NUM":259,"SCH_PROG":"259","CAPITALGAINS":"N","CAPACITY":474,"YEAR_BUILT":1942,"SQUARE_FOOTAGE":83400,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":321,"X":403681.18,"Y":135028.21,"ADDRID":294565,"ZIP_CODE":20019}},{"type":"Feature","id":"12","geometry":{"type":"Point","coordinates":[-77.00677823841423,38.91351054530605]},"properties":{"OBJECTID":12,"NAME":"C.H.O.I.C.E. Academy @ Emery","ADDRESS":"1720 1ST STREET NE","FACUSE":"Youth Engagement","LEVEL_":"YE","STATUS":"Active","PHONE":"202-939-4350","UNGRADED":23,"TOTAL_STUD":23,"SSL":" ","GIS_ID":"dcps_924","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294527,"BLDG_NUM":473,"SCH_PROG":"947","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":399412.34,"Y":138404.24,"ADDRID":294527,"ZIP_CODE":20002}},{"type":"Feature","id":"13","geometry":{"type":"Point","coordinates":[-76.99318530562586,38.89757245031559]},"properties":{"OBJECTID":13,"NAME":"School-Within-School @ Prospect","ADDRESS":"920 F STREET NE","FACUSE":"Elementary School/Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-673-8275","UNGRADED":null,"TOTAL_STUD":84,"SSL":null,"GIS_ID":"dcps_201","WEB_URL":"http://www.schoolwithinschool.org","ADDR_ID":289072,"BLDG_NUM":null,"SCH_PROG":null,"CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":400591.35000000003,"Y":136634.98,"ADDRID":289072,"ZIP_CODE":20002}},{"type":"Feature","id":"14","geometry":{"type":"Point","coordinates":[-77.0227972230375,38.97505034301654]},"properties":{"OBJECTID":14,"NAME":"Takoma Education Campus","ADDRESS":"7010 PINEY BRANCH ROAD NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-671-6050","UNGRADED":null,"TOTAL_STUD":306,"SSL":" ","GIS_ID":"dcps_3241","WEB_URL":"http://www.takomaecenter.us","ADDR_ID":250934,"BLDG_NUM":3241,"SCH_PROG":"3241","CAPITALGAINS":"Y","CAPACITY":467,"YEAR_BUILT":1976,"SQUARE_FOOTAGE":119000,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":296,"X":398024.76,"Y":145235.93,"ADDRID":250934,"ZIP_CODE":20012}},{"type":"Feature","id":"15","geometry":{"type":"Point","coordinates":[-77.00256498544964,38.89853776217709]},"properties":{"OBJECTID":15,"NAME":"Capitol Hill Montessori @ Logan","ADDRESS":"215 G STREET NE","FACUSE":"Elementary School/Specialized","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-4467","UNGRADED":0,"TOTAL_STUD":211,"SSL":" ","GIS_ID":"dcps_960","WEB_URL":"http://capitolhillmontessorischool.org/","ADDR_ID":286687,"BLDG_NUM":0,"SCH_PROG":"0","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":399777.37,"Y":136742.12,"ADDRID":286687,"ZIP_CODE":20002}},{"type":"Feature","id":"16","geometry":{"type":"Point","coordinates":[-77.00589267890359,38.91517035463655]},"properties":{"OBJECTID":16,"NAME":"Langley Elementary School","ADDRESS":"101 T STREET NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-576-6034","UNGRADED":null,"TOTAL_STUD":375,"SSL":" ","GIS_ID":"dcps_965","WEB_URL":"http://www.dcps.dc.gov/langley","ADDR_ID":285757,"BLDG_NUM":0,"SCH_PROG":"0","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":399489.48,"Y":138589.14,"ADDRID":285757,"ZIP_CODE":20002}},{"type":"Feature","id":"17","geometry":{"type":"Point","coordinates":[-77.02291294981048,38.879878381785296]},"properties":{"OBJECTID":17,"NAME":"Jefferson Middle School Academy","ADDRESS":"801 7TH STREET SW","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-729-3270","UNGRADED":null,"TOTAL_STUD":89,"SSL":" ","GIS_ID":"dcps_479","WEB_URL":"http://www.k12.dc.us/schools/Jefferson/","ADDR_ID":276812,"BLDG_NUM":415,"SCH_PROG":"415","CAPITALGAINS":"Y","CAPACITY":900,"YEAR_BUILT":1940,"SQUARE_FOOTAGE":109000,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":408,"X":398012.08,"Y":134671.03,"ADDRID":276812,"ZIP_CODE":20024}},{"type":"Feature","id":"18","geometry":{"type":"Point","coordinates":[-77.00488447622702,38.91521788633676]},"properties":{"OBJECTID":18,"NAME":"McKinley Middle School","ADDRESS":"151 T STREET NE","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-281-3950","UNGRADED":0,"TOTAL_STUD":670,"SSL":" ","GIS_ID":"dcps_970","WEB_URL":null,"ADDR_ID":296345,"BLDG_NUM":458,"SCH_PROG":"458","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":399642.48,"Y":138594.83000000002,"ADDRID":296345,"ZIP_CODE":20002}},{"type":"Feature","id":"19","geometry":{"type":"Point","coordinates":[-77.05720567559382,38.92360328286345]},"properties":{"OBJECTID":19,"NAME":"Oyster-Adams Bilingual School (Oyster)","ADDRESS":"2801 CALVERT STREET NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-671-6130","UNGRADED":0,"TOTAL_STUD":355,"SSL":" ","GIS_ID":"dcps_292","WEB_URL":"http://www.oysterbilingualschool.com/","ADDR_ID":275944,"BLDG_NUM":292,"SCH_PROG":"292","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":395039.60000000003,"Y":139526.15,"ADDRID":275944,"ZIP_CODE":20008}},{"type":"Feature","id":"2","geometry":{"type":"Point","coordinates":[-77.04437954892535,38.91731699123048]},"properties":{"OBJECTID":2,"NAME":"Oyster-Adams Bilingual School (Adams)","ADDRESS":"2020 19TH STREET NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-673-7311","UNGRADED":0,"TOTAL_STUD":321,"SSL":" ","GIS_ID":"dcps_949","WEB_URL":"http://www.oysterbilingualschool.com/","ADDR_ID":294534,"BLDG_NUM":292,"SCH_PROG":"292","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":396151.48,"Y":138827.7,"ADDRID":294534,"ZIP_CODE":20009}},{"type":"Feature","id":"20","geometry":{"type":"Point","coordinates":[-76.9324573270076,38.893322820182355]},"properties":{"OBJECTID":20,"NAME":"Kelly Miller Middle School","ADDRESS":"301 49TH STREET NE","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-388-6870","UNGRADED":null,"TOTAL_STUD":328,"SSL":" ","GIS_ID":"dcps_421","WEB_URL":"http://www.kellymillerms.com","ADDR_ID":294476,"BLDG_NUM":421,"SCH_PROG":"421","CAPITALGAINS":"Y","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":405859.65,"Y":136165.39,"ADDRID":294476,"ZIP_CODE":20019}},{"type":"Feature","id":"21","geometry":{"type":"Point","coordinates":[-77.02118795873137,38.93442155569933]},"properties":{"OBJECTID":21,"NAME":"Bruce-Monroe Elementary School @ Park View","ADDRESS":"3560 WARDER STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-576-6222","UNGRADED":0,"TOTAL_STUD":459,"SSL":" ","GIS_ID":"dcps_296","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294583,"BLDG_NUM":296,"SCH_PROG":"296","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1916,"SQUARE_FOOTAGE":82200,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":398163.16000000003,"Y":140725.73,"ADDRID":294583,"ZIP_CODE":20010}},{"type":"Feature","id":"22","geometry":{"type":"Point","coordinates":[-76.98419719147367,38.88514009935415]},"properties":{"OBJECTID":22,"NAME":"Payne Elementary School","ADDRESS":"305 15TH STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-3262","UNGRADED":null,"TOTAL_STUD":236,"SSL":" ","GIS_ID":"dcps_295","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294478,"BLDG_NUM":295,"SCH_PROG":"295","CAPITALGAINS":"N","CAPACITY":438,"YEAR_BUILT":1953,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":401371.28,"Y":135254.99,"ADDRID":294478,"ZIP_CODE":20003}},{"type":"Feature","id":"23","geometry":{"type":"Point","coordinates":[-77.029445592325,38.929206028480316]},"properties":{"OBJECTID":23,"NAME":"Tubman Elementary School","ADDRESS":"3101 13TH STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-673-7285","UNGRADED":null,"TOTAL_STUD":489,"SSL":" ","GIS_ID":"dcps_328","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294555,"BLDG_NUM":328,"SCH_PROG":"328","CAPITALGAINS":"N","CAPACITY":607,"YEAR_BUILT":1970,"SQUARE_FOOTAGE":66600,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":405,"X":397447.02,"Y":140146.96,"ADDRID":294555,"ZIP_CODE":20010}},{"type":"Feature","id":"24","geometry":{"type":"Point","coordinates":[-77.03586060596103,38.92955222717706]},"properties":{"OBJECTID":24,"NAME":"Columbia Heights Education Campus","ADDRESS":"3101 16TH STREET NW","FACUSE":"Middle School/High School//Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-939-7700","UNGRADED":0,"TOTAL_STUD":429,"SSL":" ","GIS_ID":"dcps_475","WEB_URL":"http://www.checdc.org","ADDR_ID":234375,"BLDG_NUM":475,"SCH_PROG":"475","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":396890.8,"Y":140185.59,"ADDRID":234375,"ZIP_CODE":20010}},{"type":"Feature","id":"25","geometry":{"type":"Point","coordinates":[-76.99824127024489,38.842450628512154]},"properties":{"OBJECTID":25,"NAME":"King Elementary School","ADDRESS":"3200 6TH STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-4900","UNGRADED":null,"TOTAL_STUD":345,"SSL":" ","GIS_ID":"dcps_344","WEB_URL":"http://www.dcps.dc.gov/DCPS/king","ADDR_ID":294557,"BLDG_NUM":344,"SCH_PROG":"344","CAPITALGAINS":"N","CAPACITY":525,"YEAR_BUILT":1971,"SQUARE_FOOTAGE":65500,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":368,"X":400152.88,"Y":130516.03,"ADDRID":294557,"ZIP_CODE":20032}},{"type":"Feature","id":"26","geometry":{"type":"Point","coordinates":[-77.06454012273305,38.90802702095418]},"properties":{"OBJECTID":26,"NAME":"Hyde-Addison Elementary School","ADDRESS":"3219 O STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-282-0170","UNGRADED":0,"TOTAL_STUD":308,"SSL":" ","GIS_ID":"dcps_252","WEB_URL":"http://www.hydeelementary.org/","ADDR_ID":294558,"BLDG_NUM":252,"SCH_PROG":"252","CAPITALGAINS":"N","CAPACITY":173,"YEAR_BUILT":1907,"SQUARE_FOOTAGE":20000,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":181,"X":394402.37,"Y":137797.48,"ADDRID":294558,"ZIP_CODE":20007}},{"type":"Feature","id":"27","geometry":{"type":"Point","coordinates":[-76.98031219898876,38.84764272023847]},"properties":{"OBJECTID":27,"NAME":"Turner Elementary School","ADDRESS":"3264 STANTON ROAD SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-645-3470","UNGRADED":0,"TOTAL_STUD":305,"SSL":" ","GIS_ID":"dcps_329","WEB_URL":"http://www.dcps.dc.gov/DCPS/turneratgreen","ADDR_ID":294561,"BLDG_NUM":329,"SCH_PROG":"329","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1965,"SQUARE_FOOTAGE":77700,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":401708.96,"Y":131092.7,"ADDRID":294561,"ZIP_CODE":20032}},{"type":"Feature","id":"28","geometry":{"type":"Point","coordinates":[-76.98340085175874,38.84165283786912]},"properties":{"OBJECTID":28,"NAME":"Malcolm X Elementary School","ADDRESS":"1500 MISSISSIPPI AVENUE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-645-3409","UNGRADED":null,"TOTAL_STUD":261,"SSL":" ","GIS_ID":"dcps_308","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294523,"BLDG_NUM":308,"SCH_PROG":"308","CAPITALGAINS":"N","CAPACITY":571,"YEAR_BUILT":1973,"SQUARE_FOOTAGE":110800,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":319,"X":401441.25,"Y":130427.6,"ADDRID":294523,"ZIP_CODE":20032}},{"type":"Feature","id":"29","geometry":{"type":"Point","coordinates":[-76.97638119145078,38.88343835761334]},"properties":{"OBJECTID":29,"NAME":"Incarcerated Youth Program Correctional Detention Facility","ADDRESS":"1901 D STREET SE","FACUSE":"Youth Engagement","LEVEL_":"YE","STATUS":"Active","PHONE":"202-698-5978","UNGRADED":60,"TOTAL_STUD":60,"SSL":null,"GIS_ID":"dcps_947","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":295133,"BLDG_NUM":0,"SCH_PROG":" ","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":402049.46,"Y":135066.23,"ADDRID":295133,"ZIP_CODE":20003}},{"type":"Feature","id":"3","geometry":{"type":"Point","coordinates":[-76.97189990584583,38.901999477082846]},"properties":{"OBJECTID":3,"NAME":"Phelps Architecture, Construction, and Engineering High School","ADDRESS":"704 26TH STREET NE","FACUSE":"High School/Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-729-4360","UNGRADED":null,"TOTAL_STUD":329,"SSL":" ","GIS_ID":"dcps_478","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294495,"BLDG_NUM":0,"SCH_PROG":" ","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1912,"SQUARE_FOOTAGE":205776,"POPULATION_PLAN":600,"POPULATION_ENROLLED_2008":null,"X":402437.64,"Y":137126.77,"ADDRID":294495,"ZIP_CODE":20002}},{"type":"Feature","id":"30","geometry":{"type":"Point","coordinates":[-76.92611775902036,38.883606284602386]},"properties":{"OBJECTID":30,"NAME":"C.W. Harris Elementary School","ADDRESS":"301 53RD STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-645-3188","UNGRADED":null,"TOTAL_STUD":224,"SSL":" ","GIS_ID":"dcps_247","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":289801,"BLDG_NUM":247,"SCH_PROG":"247","CAPITALGAINS":"N","CAPACITY":461,"YEAR_BUILT":1964,"SQUARE_FOOTAGE":56000,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":312,"X":406410.5,"Y":135087.2,"ADDRID":289801,"ZIP_CODE":20019}},{"type":"Feature","id":"31","geometry":{"type":"Point","coordinates":[-76.99988483141722,38.95997960935011]},"properties":{"OBJECTID":31,"NAME":"LaSalle-Backus Education Campus","ADDRESS":"501 RIGGS ROAD NE","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-671-6340","UNGRADED":0,"TOTAL_STUD":290,"SSL":" ","GIS_ID":"dcps_264","WEB_URL":"http://dcps.dc.gov/DCPS/lasalle-backus","ADDR_ID":294489,"BLDG_NUM":264,"SCH_PROG":"264","CAPITALGAINS":"N","CAPACITY":406,"YEAR_BUILT":1957,"SQUARE_FOOTAGE":63000,"POPULATION_PLAN":425,"POPULATION_ENROLLED_2008":272,"X":400010.18,"Y":143562.69,"ADDRID":294489,"ZIP_CODE":20011}},{"type":"Feature","id":"32","geometry":{"type":"Point","coordinates":[-77.019580544517,38.96729201558408]},"properties":{"OBJECTID":32,"NAME":"Coolidge High School","ADDRESS":"6315 5TH STREET NW","FACUSE":"High School","LEVEL_":"SHS","STATUS":"Active","PHONE":"202-671-6080","UNGRADED":null,"TOTAL_STUD":547,"SSL":" ","GIS_ID":"dcps_455","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294615,"BLDG_NUM":455,"SCH_PROG":"455","CAPITALGAINS":"N","CAPACITY":1240,"YEAR_BUILT":1940,"SQUARE_FOOTAGE":271300,"POPULATION_PLAN":1100,"POPULATION_ENROLLED_2008":710,"X":398303.3,"Y":144374.62,"ADDRID":294615,"ZIP_CODE":20012}},{"type":"Feature","id":"33","geometry":{"type":"Point","coordinates":[-76.98499791719597,38.94201993131289]},"properties":{"OBJECTID":33,"NAME":"Brookland Education Campus @ Bunker Hill","ADDRESS":"1401 MICHIGAN AVENUE NE","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-576-6095","UNGRADED":null,"TOTAL_STUD":304,"SSL":" ","GIS_ID":"dcps_346","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":286131,"BLDG_NUM":346,"SCH_PROG":"346","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":401300.77,"Y":141569.11000000002,"ADDRID":286131,"ZIP_CODE":20017}},{"type":"Feature","id":"34","geometry":{"type":"Point","coordinates":[-77.02843232519746,38.90350379119716]},"properties":{"OBJECTID":34,"NAME":"Thomson Elementary School","ADDRESS":"1200 L STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-898-4660","UNGRADED":null,"TOTAL_STUD":327,"SSL":" ","GIS_ID":"dcps_326","WEB_URL":"http://thomsonelementary.org/","ADDR_ID":240922,"BLDG_NUM":326,"SCH_PROG":"326","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":397533.99,"Y":137293.77,"ADDRID":240922,"ZIP_CODE":20005}},{"type":"Feature","id":"35","geometry":{"type":"Point","coordinates":[-76.98865978038536,38.89219264672113]},"properties":{"OBJECTID":35,"NAME":"Maury Elementary School","ADDRESS":"1250 CONSTITUTION AVENUE NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-3838","UNGRADED":null,"TOTAL_STUD":292,"SSL":" ","GIS_ID":"dcps_274","WEB_URL":"http://www.mauryelementary.com","ADDR_ID":294511,"BLDG_NUM":274,"SCH_PROG":"274","CAPITALGAINS":"N","CAPACITY":276,"YEAR_BUILT":1886,"SQUARE_FOOTAGE":46800,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":225,"X":400984,"Y":136037.82,"ADDRID":294511,"ZIP_CODE":20002}},{"type":"Feature","id":"36","geometry":{"type":"Point","coordinates":[-77.02847308800547,38.92217999002619]},"properties":{"OBJECTID":36,"NAME":"Cardozo Education Campus","ADDRESS":"1200 CLIFTON STREET NW","FACUSE":"Middle School/High School","LEVEL_":"EC","STATUS":"Active","PHONE":"202-673-7385","UNGRADED":null,"TOTAL_STUD":477,"SSL":" ","GIS_ID":"dcps_454","WEB_URL":"http://www.cardozoshs.com","ADDR_ID":294513,"BLDG_NUM":454,"SCH_PROG":"454","CAPITALGAINS":"N","CAPACITY":1565,"YEAR_BUILT":1926,"SQUARE_FOOTAGE":355400,"POPULATION_PLAN":1100,"POPULATION_ENROLLED_2008":1267,"X":397531.11,"Y":139367.02,"ADDRID":294513,"ZIP_CODE":20009}},{"type":"Feature","id":"37","geometry":{"type":"Point","coordinates":[-77.03069114301844,38.96054319118933]},"properties":{"OBJECTID":37,"NAME":"Brightwood Education Campus","ADDRESS":"1300 NICHOLSON STREET NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-722-5670","UNGRADED":null,"TOTAL_STUD":549,"SSL":" ","GIS_ID":"dcps_213","WEB_URL":"http://www.brightwooddc.org","ADDR_ID":294515,"BLDG_NUM":213,"SCH_PROG":"213","CAPITALGAINS":"Y","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":397340.19,"Y":143625.7,"ADDRID":294515,"ZIP_CODE":20011}},{"type":"Feature","id":"38","geometry":{"type":"Point","coordinates":[-76.98858811908718,38.912147050914335]},"properties":{"OBJECTID":38,"NAME":"Youth Services Center","ADDRESS":"1000 MOUNT OLIVET ROAD NE","FACUSE":"Youth Engagement","LEVEL_":"YE","STATUS":"Active","PHONE":"202-576-8388","UNGRADED":67,"TOTAL_STUD":67,"SSL":" ","GIS_ID":"dcps_948","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":290013,"BLDG_NUM":0,"SCH_PROG":" ","CAPITALGAINS":"N","CAPACITY":90,"YEAR_BUILT":2004,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":400989.94,"Y":138252.92,"ADDRID":290013,"ZIP_CODE":20002}},{"type":"Feature","id":"39","geometry":{"type":"Point","coordinates":[-77.07195752763505,38.9407301065553]},"properties":{"OBJECTID":39,"NAME":"Hearst Elementary School","ADDRESS":"3950 37TH STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-282-0106","UNGRADED":null,"TOTAL_STUD":257,"SSL":" ","GIS_ID":"dcps_258","WEB_URL":"http://www.hearstdc.org/","ADDR_ID":294586,"BLDG_NUM":258,"SCH_PROG":"258","CAPITALGAINS":"N","CAPACITY":181,"YEAR_BUILT":1932,"SQUARE_FOOTAGE":17400,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":161,"X":393761.89,"Y":141428.28,"ADDRID":294586,"ZIP_CODE":20008}},{"type":"Feature","id":"4","geometry":{"type":"Point","coordinates":[-77.0155869551042,38.92043757497863]},"properties":{"OBJECTID":4,"NAME":"Washington Metropolitan High School","ADDRESS":"300 BRYANT STREET NW","FACUSE":"High School/Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-671-1788","UNGRADED":null,"TOTAL_STUD":253,"SSL":" ","GIS_ID":"dcps_474","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294475,"BLDG_NUM":0,"SCH_PROG":" ","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":398648.513,"Y":139173.29,"ADDRID":294475,"ZIP_CODE":20001}},{"type":"Feature","id":"40","geometry":{"type":"Point","coordinates":[-77.07777751144927,38.950163603706905]},"properties":{"OBJECTID":40,"NAME":"Wilson High School","ADDRESS":"3950 CHESAPEAKE STREET NW","FACUSE":"High School","LEVEL_":"SHS","STATUS":"Active","PHONE":"202-282-0120","UNGRADED":4,"TOTAL_STUD":1633,"SSL":null,"GIS_ID":"dcps_463","WEB_URL":"http://www.wilsonhs.org/web/","ADDR_ID":294587,"BLDG_NUM":463,"SCH_PROG":"463","CAPITALGAINS":"N","CAPACITY":1485,"YEAR_BUILT":1935,"SQUARE_FOOTAGE":271300,"POPULATION_PLAN":1600,"POPULATION_ENROLLED_2008":1557,"X":393258.18,"Y":142475.96,"ADDRID":294587,"ZIP_CODE":20016}},{"type":"Feature","id":"41","geometry":{"type":"Point","coordinates":[-77.07907610579473,38.92305210258978]},"properties":{"OBJECTID":41,"NAME":"Stoddert Elementary School","ADDRESS":"4001 CALVERT STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6030","UNGRADED":null,"TOTAL_STUD":347,"SSL":" ","GIS_ID":"dcps_321","WEB_URL":"http://www.stoddert.org","ADDR_ID":224730,"BLDG_NUM":321,"SCH_PROG":"321","CAPITALGAINS":"N","CAPACITY":213,"YEAR_BUILT":1932,"SQUARE_FOOTAGE":17400,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":260,"X":393143.05,"Y":139466.38,"ADDRID":224730,"ZIP_CODE":20007}},{"type":"Feature","id":"42","geometry":{"type":"Point","coordinates":[-77.01812758723682,38.87952285065163]},"properties":{"OBJECTID":42,"NAME":"Amidon-Bowen Elementary School","ADDRESS":"401 I STREET SW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-724-4867","UNGRADED":0,"TOTAL_STUD":254,"SSL":" ","GIS_ID":"dcps_203","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294482,"BLDG_NUM":203,"SCH_PROG":"203","CAPITALGAINS":"N","CAPACITY":438,"YEAR_BUILT":1960,"SQUARE_FOOTAGE":70800,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":227,"X":398427.29000000004,"Y":134631.47,"ADDRID":294482,"ZIP_CODE":20024}},{"type":"Feature","id":"43","geometry":{"type":"Point","coordinates":[-77.00019727700331,38.83598797717475]},"properties":{"OBJECTID":43,"NAME":"Simon Elementary School","ADDRESS":"401 MISSISSIPPI AVENUE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-645-3360","UNGRADED":null,"TOTAL_STUD":252,"SSL":" ","GIS_ID":"dcps_315","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294481,"BLDG_NUM":315,"SCH_PROG":"315","CAPITALGAINS":"N","CAPACITY":549,"YEAR_BUILT":1950,"SQUARE_FOOTAGE":66200,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":259,"X":399983.07,"Y":129798.63,"ADDRID":294481,"ZIP_CODE":20032}},{"type":"Feature","id":"44","geometry":{"type":"Point","coordinates":[-77.00000666379914,38.89630515733755]},"properties":{"OBJECTID":44,"NAME":"Stuart-Hobson Middle School","ADDRESS":"410 E STREET NE","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-671-6010","UNGRADED":null,"TOTAL_STUD":403,"SSL":" ","GIS_ID":"dcps_428","WEB_URL":"http://www.capitolhillclusterschool.org/","ADDR_ID":294483,"BLDG_NUM":428,"SCH_PROG":"428","CAPITALGAINS":"Y","CAPACITY":460,"YEAR_BUILT":1927,"SQUARE_FOOTAGE":105900,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":393,"X":399999.62,"Y":136494.28,"ADDRID":294483,"ZIP_CODE":20002}},{"type":"Feature","id":"45","geometry":{"type":"Point","coordinates":[-77.08099713716989,38.94755788089556]},"properties":{"OBJECTID":45,"NAME":"Janney Elementary School","ADDRESS":"4130 ALBEMARLE STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-282-0110","UNGRADED":null,"TOTAL_STUD":548,"SSL":" ","GIS_ID":"dcps_254","WEB_URL":"http://www.janneyschool.org/","ADDR_ID":285713,"BLDG_NUM":254,"SCH_PROG":"254","CAPITALGAINS":"N","CAPACITY":364,"YEAR_BUILT":1925,"SQUARE_FOOTAGE":98200,"POPULATION_PLAN":550,"POPULATION_ENROLLED_2008":484,"X":392978.88,"Y":142186.88,"ADDRID":285713,"ZIP_CODE":20016}},{"type":"Feature","id":"46","geometry":{"type":"Point","coordinates":[-76.98999904872527,38.8834744591022]},"properties":{"OBJECTID":46,"NAME":"Watkins Elementary School","ADDRESS":"420 12TH STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-3355","UNGRADED":null,"TOTAL_STUD":521,"SSL":" ","GIS_ID":"dcps_333","WEB_URL":"http://www.capitolhillclusterschool.org/","ADDR_ID":294486,"BLDG_NUM":333,"SCH_PROG":"333","CAPITALGAINS":"N","CAPACITY":578,"YEAR_BUILT":1962,"SQUARE_FOOTAGE":69300,"POPULATION_PLAN":550,"POPULATION_ENROLLED_2008":538,"X":400867.92,"Y":135070.02,"ADDRID":294486,"ZIP_CODE":20003}},{"type":"Feature","id":"47","geometry":{"type":"Point","coordinates":[-77.01289419627216,38.82820422258409]},"properties":{"OBJECTID":47,"NAME":"Leckie Elementary School","ADDRESS":"4201 MARTIN LUTHER KING JR AVENUE SW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-645-3330","UNGRADED":null,"TOTAL_STUD":361,"SSL":" ","GIS_ID":"dcps_266","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294592,"BLDG_NUM":266,"SCH_PROG":"266","CAPITALGAINS":"N","CAPACITY":471,"YEAR_BUILT":1970,"SQUARE_FOOTAGE":65000,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":302,"X":398880.58,"Y":128934.66,"ADDRID":294592,"ZIP_CODE":20032}},{"type":"Feature","id":"48","geometry":{"type":"Point","coordinates":[-76.9684924980307,38.859279554952096]},"properties":{"OBJECTID":48,"NAME":"Stanton Elementary School","ADDRESS":"2701 NAYLOR ROAD SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6180","UNGRADED":null,"TOTAL_STUD":355,"SSL":" ","GIS_ID":"dcps_319","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294547,"BLDG_NUM":319,"SCH_PROG":"319","CAPITALGAINS":"N","CAPACITY":547,"YEAR_BUILT":1944,"SQUARE_FOOTAGE":83800,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":379,"X":402734.84,"Y":132384.63,"ADDRID":294547,"ZIP_CODE":20020}},{"type":"Feature","id":"49","geometry":{"type":"Point","coordinates":[-76.99649477618172,38.898751596381906]},"properties":{"OBJECTID":49,"NAME":"Ludlow-Taylor Elementary School","ADDRESS":"659 G STREET NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-3244","UNGRADED":0,"TOTAL_STUD":258,"SSL":" ","GIS_ID":"dcps_271","WEB_URL":"http://www.ludlowtaylor.org","ADDR_ID":294494,"BLDG_NUM":271,"SCH_PROG":"271","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":400304.26,"Y":136765.86000000002,"ADDRID":294494,"ZIP_CODE":20002}},{"type":"Feature","id":"5","geometry":{"type":"Point","coordinates":[-77.02643495398235,38.935818665270325]},"properties":{"OBJECTID":5,"NAME":"Fillmore Arts Center (East)","ADDRESS":"915 SPRING ROAD NW","FACUSE":"Arts Center","LEVEL_":"AC","STATUS":"Active","PHONE":"202-576-9709","UNGRADED":0,"TOTAL_STUD":0,"SSL":" ","GIS_ID":"dcps_922","WEB_URL":"http://www.fillmoreartscenter.org/","ADDR_ID":226682,"BLDG_NUM":0,"SCH_PROG":"0","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":397708.28,"Y":140880.94,"ADDRID":226682,"ZIP_CODE":20010}},{"type":"Feature","id":"50","geometry":{"type":"Point","coordinates":[-76.99659130436592,38.902765453788696]},"properties":{"OBJECTID":50,"NAME":"J.O. Wilson Elementary School","ADDRESS":"660 K STREET NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-4733","UNGRADED":0,"TOTAL_STUD":382,"SSL":" ","GIS_ID":"dcps_339","WEB_URL":"http://www.dcps.dc.gov/jowilson","ADDR_ID":288841,"BLDG_NUM":339,"SCH_PROG":"339","CAPITALGAINS":"N","CAPACITY":412,"YEAR_BUILT":1961,"SQUARE_FOOTAGE":98900,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":360,"X":400295.87,"Y":137211.43,"ADDRID":288841,"ZIP_CODE":20002}},{"type":"Feature","id":"51","geometry":{"type":"Point","coordinates":[-77.03399752739988,38.98461075308425]},"properties":{"OBJECTID":51,"NAME":"Shepherd Elementary School","ADDRESS":"7800 14TH STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-576-6140","UNGRADED":null,"TOTAL_STUD":331,"SSL":" ","GIS_ID":"dcps_313","WEB_URL":"http://www.shepherd-elementary.org","ADDR_ID":256319,"BLDG_NUM":313,"SCH_PROG":"313","CAPITALGAINS":"N","CAPACITY":332,"YEAR_BUILT":1932,"SQUARE_FOOTAGE":79700,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":312,"X":397054.62,"Y":146297.53,"ADDRID":256319,"ZIP_CODE":20012}},{"type":"Feature","id":"52","geometry":{"type":"Point","coordinates":[-77.03225535232298,38.95137487737547]},"properties":{"OBJECTID":52,"NAME":"West Education Campus","ADDRESS":"1338 FARRAGUT STREET NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-576-6226","UNGRADED":null,"TOTAL_STUD":244,"SSL":" ","GIS_ID":"dcps_336","WEB_URL":"http://www.westschool.org/","ADDR_ID":294517,"BLDG_NUM":336,"SCH_PROG":"336","CAPITALGAINS":"N","CAPACITY":281,"YEAR_BUILT":1978,"SQUARE_FOOTAGE":69600,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":190,"X":397204.26,"Y":142607.98,"ADDRID":294517,"ZIP_CODE":20011}},{"type":"Feature","id":"53","geometry":{"type":"Point","coordinates":[-77.03122971732124,38.94154180435055]},"properties":{"OBJECTID":53,"NAME":"Powell Elementary School","ADDRESS":"1350 UPSHUR STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6270","UNGRADED":null,"TOTAL_STUD":310,"SSL":" ","GIS_ID":"dcps_300","WEB_URL":"http://www.dcps.dc.gov/DCPS/powell","ADDR_ID":255302,"BLDG_NUM":300,"SCH_PROG":"300","CAPITALGAINS":"N","CAPACITY":304,"YEAR_BUILT":1925,"SQUARE_FOOTAGE":38500,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":258,"X":397292.79000000004,"Y":141516.39,"ADDRID":255302,"ZIP_CODE":20011}},{"type":"Feature","id":"54","geometry":{"type":"Point","coordinates":[-76.97968656994185,38.890410115128155]},"properties":{"OBJECTID":54,"NAME":"Eastern High School","ADDRESS":"1700 EAST CAPITOL STREET NE","FACUSE":"High School","LEVEL_":"SHS","STATUS":"Active","PHONE":"202-698-4500","UNGRADED":null,"TOTAL_STUD":303,"SSL":" ","GIS_ID":"dcps_457","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":289529,"BLDG_NUM":457,"SCH_PROG":"457","CAPITALGAINS":"N","CAPACITY":1425,"YEAR_BUILT":1923,"SQUARE_FOOTAGE":288800,"POPULATION_PLAN":6,"POPULATION_ENROLLED_2008":915,"X":401762.5,"Y":135840.08000000002,"ADDRID":289529,"ZIP_CODE":20003}},{"type":"Feature","id":"55","geometry":{"type":"Point","coordinates":[-76.98017358027091,38.87129385290139]},"properties":{"OBJECTID":55,"NAME":"Kramer Middle School","ADDRESS":"1700 Q STREET SE","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-939-3150","UNGRADED":null,"TOTAL_STUD":277,"SSL":" ","GIS_ID":"dcps_417","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":289467,"BLDG_NUM":417,"SCH_PROG":"417","CAPITALGAINS":"N","CAPACITY":655,"YEAR_BUILT":1943,"SQUARE_FOOTAGE":154000,"POPULATION_PLAN":550,"POPULATION_ENROLLED_2008":340,"X":401720.71,"Y":133718.02,"ADDRID":289467,"ZIP_CODE":20020}},{"type":"Feature","id":"56","geometry":{"type":"Point","coordinates":[-77.03966444134119,38.91239860359402]},"properties":{"OBJECTID":56,"NAME":"Ross Elementary School","ADDRESS":"1730 R STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-673-7200","UNGRADED":null,"TOTAL_STUD":157,"SSL":" ","GIS_ID":"dcps_305","WEB_URL":"http://www.rosselementary.org/","ADDR_ID":241714,"BLDG_NUM":305,"SCH_PROG":"305","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":396560.15,"Y":138281.53,"ADDRID":241714,"ZIP_CODE":20009}},{"type":"Feature","id":"57","geometry":{"type":"Point","coordinates":[-77.04055574230114,38.93432581619343]},"properties":{"OBJECTID":57,"NAME":"Bancroft Elementary School","ADDRESS":"1755 NEWTON STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-673-7280","UNGRADED":null,"TOTAL_STUD":463,"SSL":" ","GIS_ID":"dcps_204","WEB_URL":"http://www.bancroftelementary.org","ADDR_ID":294528,"BLDG_NUM":204,"SCH_PROG":"204","CAPITALGAINS":"N","CAPACITY":527,"YEAR_BUILT":1924,"SQUARE_FOOTAGE":79800,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":451,"X":396483.93,"Y":140715.67,"ADDRID":294528,"ZIP_CODE":20010}},{"type":"Feature","id":"58","geometry":{"type":"Point","coordinates":[-77.06861620212666,38.91551648717705]},"properties":{"OBJECTID":58,"NAME":"Hardy Middle School","ADDRESS":"1819 35TH STREET NW","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-729-4350","UNGRADED":null,"TOTAL_STUD":412,"SSL":" ","GIS_ID":"dcps_246","WEB_URL":"http://www.hardyms.org","ADDR_ID":274432,"BLDG_NUM":246,"SCH_PROG":"246","CAPITALGAINS":"Y","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":394049.46,"Y":138629.13,"ADDRID":274432,"ZIP_CODE":20007}},{"type":"Feature","id":"59","geometry":{"type":"Point","coordinates":[-76.97080704835298,38.85174082148898]},"properties":{"OBJECTID":59,"NAME":"Garfield Elementary School","ADDRESS":"2435 ALABAMA AVENUE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6140","UNGRADED":null,"TOTAL_STUD":240,"SSL":" ","GIS_ID":"dcps_238","WEB_URL":"http://www.dcps.dc.gov/garfield","ADDR_ID":278160,"BLDG_NUM":238,"SCH_PROG":"238","CAPITALGAINS":"N","CAPACITY":446,"YEAR_BUILT":1977,"SQUARE_FOOTAGE":58908,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":322,"X":402534.22000000003,"Y":131547.71,"ADDRID":278160,"ZIP_CODE":20020}},{"type":"Feature","id":"6","geometry":{"type":"Point","coordinates":[-77.0009775434966,38.83939010653733]},"properties":{"OBJECTID":6,"NAME":"Ballou High School","ADDRESS":"3401 4TH STREET SE","FACUSE":"High School","LEVEL_":"SHS","STATUS":"Active","PHONE":"202-645-3400","UNGRADED":null,"TOTAL_STUD":910,"SSL":" ","GIS_ID":"dcps_452","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294567,"BLDG_NUM":452,"SCH_PROG":"452","CAPITALGAINS":"N","CAPACITY":1565,"YEAR_BUILT":1960,"SQUARE_FOOTAGE":271300,"POPULATION_PLAN":1200,"POPULATION_ENROLLED_2008":1267,"X":399915.33,"Y":130176.29000000001,"ADDRID":294567,"ZIP_CODE":20032}},{"type":"Feature","id":"60","geometry":{"type":"Point","coordinates":[-77.01391814838377,38.90419954573118]},"properties":{"OBJECTID":60,"NAME":"Walker-Jones Education Campus","ADDRESS":"1125 NEW JERSEY AVENUE NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-939-5934","UNGRADED":null,"TOTAL_STUD":418,"SSL":" ","GIS_ID":"dcps_332","WEB_URL":"http://dcps.dc.gov/DCPS/walker-jones","ADDR_ID":307735,"BLDG_NUM":332,"SCH_PROG":"332","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":398792.97000000003,"Y":137370.7,"ADDRID":307735,"ZIP_CODE":20001}},{"type":"Feature","id":"61","geometry":{"type":"Point","coordinates":[-76.99204394250515,38.88109180742631]},"properties":{"OBJECTID":61,"NAME":"Tyler Elementary School","ADDRESS":"1001 G STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-4810","UNGRADED":null,"TOTAL_STUD":402,"SSL":" ","GIS_ID":"dcps_330","WEB_URL":"http://www.tylerelementary.net","ADDR_ID":294505,"BLDG_NUM":330,"SCH_PROG":"330","CAPITALGAINS":"N","CAPACITY":452,"YEAR_BUILT":1949,"SQUARE_FOOTAGE":69600,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":265,"X":400690.52,"Y":134805.51,"ADDRID":294505,"ZIP_CODE":20003}},{"type":"Feature","id":"62","geometry":{"type":"Point","coordinates":[-77.04818876406597,38.898131572671346]},"properties":{"OBJECTID":62,"NAME":"School Without Walls High School","ADDRESS":"2130 G STREET NW","FACUSE":"High School/Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-645-9690","UNGRADED":19,"TOTAL_STUD":527,"SSL":" ","GIS_ID":"dcps_466","WEB_URL":"http://www.swwhs.org/","ADDR_ID":242528,"BLDG_NUM":466,"SCH_PROG":"466","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1935,"SQUARE_FOOTAGE":47200,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":395820.01,"Y":136698.13,"ADDRID":242528,"ZIP_CODE":20037}},{"type":"Feature","id":"63","geometry":{"type":"Point","coordinates":[-76.9299499086104,38.90542277817764]},"properties":{"OBJECTID":63,"NAME":"Houston Elementary School","ADDRESS":"1100 50TH PLACE NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6170","UNGRADED":null,"TOTAL_STUD":223,"SSL":" ","GIS_ID":"dcps_251","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":156316,"BLDG_NUM":251,"SCH_PROG":"251","CAPITALGAINS":"N","CAPACITY":507,"YEAR_BUILT":1962,"SQUARE_FOOTAGE":59900,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":289,"X":406076.15,"Y":137508.74,"ADDRID":156316,"ZIP_CODE":20019}},{"type":"Feature","id":"64","geometry":{"type":"Point","coordinates":[-77.01777937203113,38.948238410748694]},"properties":{"OBJECTID":64,"NAME":"Barnard Elementary School","ADDRESS":"430 DECATUR STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-576-1100","UNGRADED":null,"TOTAL_STUD":482,"SSL":" ","GIS_ID":"dcps_205","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":248305,"BLDG_NUM":205,"SCH_PROG":"205","CAPITALGAINS":"N","CAPACITY":387,"YEAR_BUILT":2003,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":398458.99,"Y":142259.46,"ADDRID":248305,"ZIP_CODE":20011}},{"type":"Feature","id":"65","geometry":{"type":"Point","coordinates":[-77.03047062659084,38.943482120059585]},"properties":{"OBJECTID":65,"NAME":"Sharpe Health School","ADDRESS":"4300 13TH STREET NW","FACUSE":"Special Education School","LEVEL_":"SE","STATUS":"Active","PHONE":"202-576-6161","UNGRADED":89,"TOTAL_STUD":89,"SSL":" ","GIS_ID":"dcps_312","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":255254,"BLDG_NUM":312,"SCH_PROG":"312","CAPITALGAINS":"N","CAPACITY":250,"YEAR_BUILT":1958,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":397358.67,"Y":141731.76,"ADDRID":255254,"ZIP_CODE":20011}},{"type":"Feature","id":"66","geometry":{"type":"Point","coordinates":[-77.00848699104039,38.82697379912605]},"properties":{"OBJECTID":66,"NAME":"Patterson Elementary School","ADDRESS":"4399 SOUTH CAPITOL TERRACE SW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-5280","UNGRADED":null,"TOTAL_STUD":320,"SSL":" ","GIS_ID":"dcps_294","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":301073,"BLDG_NUM":294,"SCH_PROG":"294","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":2004,"SQUARE_FOOTAGE":78300,"POPULATION_PLAN":368,"POPULATION_ENROLLED_2008":null,"X":399263.25,"Y":128798.03,"ADDRID":301073,"ZIP_CODE":20032}},{"type":"Feature","id":"67","geometry":{"type":"Point","coordinates":[-77.02777863575504,38.943615972158675]},"properties":{"OBJECTID":67,"NAME":"Roosevelt High School","ADDRESS":"4400 IOWA AVENUE NW","FACUSE":"High School","LEVEL_":"SHS","STATUS":"Active","PHONE":"202-576-6130","UNGRADED":null,"TOTAL_STUD":497,"SSL":" ","GIS_ID":"dcps_459","WEB_URL":"http://roosevelt.k12.dc.us/","ADDR_ID":252605,"BLDG_NUM":459,"SCH_PROG":"459","CAPITALGAINS":"N","CAPACITY":1055,"YEAR_BUILT":1932,"SQUARE_FOOTAGE":331900,"POPULATION_PLAN":1100,"POPULATION_ENROLLED_2008":845,"X":397592.04000000004,"Y":141746.55000000002,"ADDRID":294595,"ZIP_CODE":20011}},{"type":"Feature","id":"68","geometry":{"type":"Point","coordinates":[-76.93847090276373,38.89356149009405]},"properties":{"OBJECTID":68,"NAME":"Smothers Elementary School","ADDRESS":"4400 BROOKS STREET NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-3600","UNGRADED":null,"TOTAL_STUD":242,"SSL":" ","GIS_ID":"dcps_322","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294596,"BLDG_NUM":322,"SCH_PROG":"322","CAPITALGAINS":"N","CAPACITY":332,"YEAR_BUILT":1923,"SQUARE_FOOTAGE":43000,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":186,"X":405337.95,"Y":136191.51,"ADDRID":294596,"ZIP_CODE":20019}},{"type":"Feature","id":"69","geometry":{"type":"Point","coordinates":[-77.08782850700713,38.934299762597995]},"properties":{"OBJECTID":69,"NAME":"Mann Elementary School","ADDRESS":"4430 NEWARK STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-282-0126","UNGRADED":null,"TOTAL_STUD":290,"SSL":" ","GIS_ID":"dcps_273","WEB_URL":"http://www.horacemanndc.org/","ADDR_ID":294597,"BLDG_NUM":273,"SCH_PROG":"273","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":392385.28,"Y":140715.66,"ADDRID":294597,"ZIP_CODE":20016}},{"type":"Feature","id":"7","geometry":{"type":"Point","coordinates":[-76.98294592823262,38.85666496864018]},"properties":{"OBJECTID":7,"NAME":"Moten Elementary School","ADDRESS":"1565 MORRIS ROAD SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-1111","UNGRADED":0,"TOTAL_STUD":315,"SSL":" ","GIS_ID":"dcps_920","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294524,"BLDG_NUM":285,"SCH_PROG":"285A","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1976,"SQUARE_FOOTAGE":144900,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":401480.43,"Y":132093.89,"ADDRID":294524,"ZIP_CODE":20020}},{"type":"Feature","id":"70","geometry":{"type":"Point","coordinates":[-76.93993693965614,38.88724765063355]},"properties":{"OBJECTID":70,"NAME":"Plummer Elementary School","ADDRESS":"4601 TEXAS AVENUE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-4360","UNGRADED":null,"TOTAL_STUD":220,"SSL":" ","GIS_ID":"dcps_299","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":19536,"BLDG_NUM":299,"SCH_PROG":"299","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":405211.23,"Y":135490.54,"ADDRID":19536,"ZIP_CODE":20019}},{"type":"Feature","id":"71","geometry":{"type":"Point","coordinates":[-76.97845864927179,38.93351012172938]},"properties":{"OBJECTID":71,"NAME":"Burroughs Education Campus","ADDRESS":"1820 MONROE STREET NE","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-576-6150","UNGRADED":null,"TOTAL_STUD":296,"SSL":" ","GIS_ID":"dcps_220","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294530,"BLDG_NUM":220,"SCH_PROG":"220","CAPITALGAINS":"Y","CAPACITY":474,"YEAR_BUILT":1980,"SQUARE_FOOTAGE":63900,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":240,"X":401867.9,"Y":140624.56,"ADDRID":294530,"ZIP_CODE":20018}},{"type":"Feature","id":"72","geometry":{"type":"Point","coordinates":[-77.02270946757577,38.91515274437822]},"properties":{"OBJECTID":72,"NAME":"Cleveland Elementary School","ADDRESS":"1825 8TH STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-4380","UNGRADED":null,"TOTAL_STUD":301,"SSL":" ","GIS_ID":"dcps_224","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294531,"BLDG_NUM":224,"SCH_PROG":"224","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":1911,"SQUARE_FOOTAGE":54427,"POPULATION_PLAN":276,"POPULATION_ENROLLED_2008":null,"X":398030.71,"Y":138586.76,"ADDRID":294531,"ZIP_CODE":20001}},{"type":"Feature","id":"73","geometry":{"type":"Point","coordinates":[-76.97898019572973,38.892438946299286]},"properties":{"OBJECTID":73,"NAME":"Eliot-Hine Middle School","ADDRESS":"1830 CONSTITUTION AVENUE NE","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-939-5380","UNGRADED":0,"TOTAL_STUD":348,"SSL":" ","GIS_ID":"dcps_407","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":286499,"BLDG_NUM":407,"SCH_PROG":"407","CAPITALGAINS":"Y","CAPACITY":850,"YEAR_BUILT":1931,"SQUARE_FOOTAGE":155100,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":155,"X":401823.73,"Y":136065.31,"ADDRID":286499,"ZIP_CODE":20002}},{"type":"Feature","id":"74","geometry":{"type":"Point","coordinates":[-76.97708413269909,38.924711621752145]},"properties":{"OBJECTID":74,"NAME":"Langdon Education Campus","ADDRESS":"1900 EVARTS STREET NE","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-576-6048","UNGRADED":null,"TOTAL_STUD":404,"SSL":" ","GIS_ID":"dcps_262","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294532,"BLDG_NUM":262,"SCH_PROG":"262","CAPITALGAINS":"N","CAPACITY":528,"YEAR_BUILT":1930,"SQUARE_FOOTAGE":101400,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":408,"X":401987.32,"Y":139647.88,"ADDRID":294532,"ZIP_CODE":20018}},{"type":"Feature","id":"75","geometry":{"type":"Point","coordinates":[-76.98362343869536,38.86605014193506]},"properties":{"OBJECTID":75,"NAME":"Ketcham Elementary School","ADDRESS":"1919 15TH STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-1122","UNGRADED":null,"TOTAL_STUD":256,"SSL":" ","GIS_ID":"dcps_257","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":286537,"BLDG_NUM":257,"SCH_PROG":"257","CAPITALGAINS":"N","CAPACITY":461,"YEAR_BUILT":1909,"SQUARE_FOOTAGE":88300,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":356,"X":401421.44,"Y":133135.87,"ADDRID":286537,"ZIP_CODE":20020}},{"type":"Feature","id":"76","geometry":{"type":"Point","coordinates":[-76.99360654064103,38.86285943336159]},"properties":{"OBJECTID":76,"NAME":"Savoy Elementary School","ADDRESS":"2400 SHANNON PLACE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-2000","UNGRADED":0,"TOTAL_STUD":344,"SSL":" ","GIS_ID":"dcps_307","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":278153,"BLDG_NUM":307,"SCH_PROG":"307","CAPITALGAINS":"N","CAPACITY":479,"YEAR_BUILT":1968,"SQUARE_FOOTAGE":64800,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":191,"X":400555.08,"Y":132781.57,"ADDRID":278153,"ZIP_CODE":20020}},{"type":"Feature","id":"77","geometry":{"type":"Point","coordinates":[-77.05232329698579,38.907476955475495]},"properties":{"OBJECTID":77,"NAME":"School Without Walls @ Francis Stevens","ADDRESS":"2425 N STREET NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-724-4841","UNGRADED":null,"TOTAL_STUD":233,"SSL":" ","GIS_ID":"dcps_409","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294544,"BLDG_NUM":409,"SCH_PROG":"409","CAPITALGAINS":"N","CAPACITY":520,"YEAR_BUILT":1927,"SQUARE_FOOTAGE":95100,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":165,"X":395461.95,"Y":137735.74,"ADDRID":294544,"ZIP_CODE":20037}},{"type":"Feature","id":"78","geometry":{"type":"Point","coordinates":[-76.99986026986704,38.892903777306]},"properties":{"OBJECTID":78,"NAME":"Peabody Elementary School","ADDRESS":"425 C STREET NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-698-3277","UNGRADED":null,"TOTAL_STUD":150,"SSL":" ","GIS_ID":"dcps_301","WEB_URL":"http://www.capitolhillclusterschool.org/","ADDR_ID":288145,"BLDG_NUM":301,"SCH_PROG":"301","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":400012.32,"Y":136116.7,"ADDRID":288145,"ZIP_CODE":20002}},{"type":"Feature","id":"79","geometry":{"type":"Point","coordinates":[-76.9991871249605,38.82899335346775]},"properties":{"OBJECTID":79,"NAME":"Hendley Elementary School","ADDRESS":"425 CHESAPEAKE STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-645-3450","UNGRADED":null,"TOTAL_STUD":341,"SSL":" ","GIS_ID":"dcps_249","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":24445,"BLDG_NUM":249,"SCH_PROG":"249","CAPITALGAINS":"N","CAPACITY":559,"YEAR_BUILT":1959,"SQUARE_FOOTAGE":73200,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":207,"X":400070.78,"Y":129022.18000000001,"ADDRID":24445,"ZIP_CODE":20032}},{"type":"Feature","id":"8","geometry":{"type":"Point","coordinates":[-77.0009775434966,38.83939010653733]},"properties":{"OBJECTID":8,"NAME":"Ballou STAY High School","ADDRESS":"3401 4TH STREET SE","FACUSE":"Youth Engagement","LEVEL_":"STAY","STATUS":"Active","PHONE":"202-645-3390","UNGRADED":735,"TOTAL_STUD":735,"SSL":" ","GIS_ID":"dcps_914","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294567,"BLDG_NUM":452,"SCH_PROG":"452A","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":399915.33,"Y":130176.29000000001,"ADDRID":294567,"ZIP_CODE":20032}},{"type":"Feature","id":"80","geometry":{"type":"Point","coordinates":[-76.96435855383109,38.870099185756025]},"properties":{"OBJECTID":80,"NAME":"Randle Highlands Elementary School","ADDRESS":"1650 30TH STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-729-3250","UNGRADED":null,"TOTAL_STUD":384,"SSL":" ","GIS_ID":"dcps_316","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":156337,"BLDG_NUM":316,"SCH_PROG":"316","CAPITALGAINS":"N","CAPACITY":520,"YEAR_BUILT":2003,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":403093.17,"Y":133585.82,"ADDRID":156337,"ZIP_CODE":20020}},{"type":"Feature","id":"81","geometry":{"type":"Point","coordinates":[-77.07030987431249,38.91345383178434]},"properties":{"OBJECTID":81,"NAME":"Ellington School of the Arts","ADDRESS":"3500 R STREET NW","FACUSE":"High School/Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-282-0123","UNGRADED":1,"TOTAL_STUD":517,"SSL":" ","GIS_ID":"dcps_471","WEB_URL":"http://www.ellingtonschool.org","ADDR_ID":294569,"BLDG_NUM":471,"SCH_PROG":"471","CAPITALGAINS":"N","CAPACITY":500,"YEAR_BUILT":1898,"SQUARE_FOOTAGE":167500,"POPULATION_PLAN":700,"POPULATION_ENROLLED_2008":463,"X":393902.4,"Y":138400.27,"ADDRID":294569,"ZIP_CODE":20007}},{"type":"Feature","id":"82","geometry":{"type":"Point","coordinates":[-76.95211317978585,38.90128642690779]},"properties":{"OBJECTID":82,"NAME":"Thomas Elementary School","ADDRESS":"650 ANACOSTIA AVENUE NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-724-4593","UNGRADED":null,"TOTAL_STUD":235,"SSL":" ","GIS_ID":"dcps_325","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294493,"BLDG_NUM":325,"SCH_PROG":"325","CAPITALGAINS":"N","CAPACITY":636,"YEAR_BUILT":1946,"SQUARE_FOOTAGE":87600,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":287,"X":404154.01,"Y":137048.33000000002,"ADDRID":294493,"ZIP_CODE":20019}},{"type":"Feature","id":"83","geometry":{"type":"Point","coordinates":[-76.93079876645987,38.88596187224884]},"properties":{"OBJECTID":83,"NAME":"Nalle Elementary School","ADDRESS":"219 50TH STREET SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6280","UNGRADED":null,"TOTAL_STUD":327,"SSL":" ","GIS_ID":"dcps_288","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294474,"BLDG_NUM":288,"SCH_PROG":"288","CAPITALGAINS":"N","CAPACITY":460,"YEAR_BUILT":1950,"SQUARE_FOOTAGE":83900,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":383,"X":406004.16000000003,"Y":135348.37,"ADDRID":294474,"ZIP_CODE":20019}},{"type":"Feature","id":"84","geometry":{"type":"Point","coordinates":[-77.04053225052327,38.91917509629289]},"properties":{"OBJECTID":84,"NAME":"Marie Reed Elementary School","ADDRESS":"2200 CHAMPLAIN STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-673-7308","UNGRADED":0,"TOTAL_STUD":357,"SSL":" ","GIS_ID":"dcps_284","WEB_URL":"http://www.dcps.dc.gov/DCPS/mariereed","ADDR_ID":235577,"BLDG_NUM":284,"SCH_PROG":"284","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":396485.22000000003,"Y":139033.81,"ADDRID":235577,"ZIP_CODE":20009}},{"type":"Feature","id":"85","geometry":{"type":"Point","coordinates":[-76.97448629119839,38.87180460651209]},"properties":{"OBJECTID":85,"NAME":"Orr Elementary School","ADDRESS":"2200 MINNESOTA AVENUE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6240","UNGRADED":null,"TOTAL_STUD":308,"SSL":" ","GIS_ID":"dcps_291","WEB_URL":"http://orrelementary.com/","ADDR_ID":294539,"BLDG_NUM":291,"SCH_PROG":"291","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":402214.23,"Y":133774.84,"ADDRID":294539,"ZIP_CODE":20020}},{"type":"Feature","id":"86","geometry":{"type":"Point","coordinates":[-77.03881288124978,38.92395054307423]},"properties":{"OBJECTID":86,"NAME":"H.D. Cooke Elementary School","ADDRESS":"2525 17TH STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-5390","UNGRADED":null,"TOTAL_STUD":396,"SSL":" ","GIS_ID":"dcps_227","WEB_URL":"http://www.dcps.dc.gov/DCPS/hdcooke","ADDR_ID":235863,"BLDG_NUM":227,"SCH_PROG":"227","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":396634.55,"Y":139563.86000000002,"ADDRID":235863,"ZIP_CODE":20009}},{"type":"Feature","id":"87","geometry":{"type":"Point","coordinates":[-76.95560701756008,38.86435728742929]},"properties":{"OBJECTID":87,"NAME":"Beers Elementary School","ADDRESS":"3600 ALABAMA AVENUE SE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-939-4800","UNGRADED":null,"TOTAL_STUD":386,"SSL":" ","GIS_ID":"dcps_206","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":278406,"BLDG_NUM":206,"SCH_PROG":"206","CAPITALGAINS":"N","CAPACITY":448,"YEAR_BUILT":1942,"SQUARE_FOOTAGE":77500,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":330,"X":403852.94,"Y":132948.76,"ADDRID":278406,"ZIP_CODE":20020}},{"type":"Feature","id":"88","geometry":{"type":"Point","coordinates":[-76.95316111317253,38.88390186232114]},"properties":{"OBJECTID":88,"NAME":"Sousa Middle School","ADDRESS":"3650 ELY PLACE SE","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-729-3260","UNGRADED":null,"TOTAL_STUD":348,"SSL":" ","GIS_ID":"dcps_427","WEB_URL":"http://www.sousamiddleschool.org/","ADDR_ID":294584,"BLDG_NUM":427,"SCH_PROG":"427","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":404064.10000000003,"Y":135118.46,"ADDRID":294584,"ZIP_CODE":20019}},{"type":"Feature","id":"89","geometry":{"type":"Point","coordinates":[-77.07520137805462,38.952904202814935]},"properties":{"OBJECTID":89,"NAME":"Deal Middle School","ADDRESS":"3815 FORT DRIVE NW","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-939-2010","UNGRADED":null,"TOTAL_STUD":1014,"SSL":" ","GIS_ID":"dcps_405","WEB_URL":"http://www.dealpta.org","ADDR_ID":277548,"BLDG_NUM":405,"SCH_PROG":"405","CAPITALGAINS":"N","CAPACITY":900,"YEAR_BUILT":1931,"SQUARE_FOOTAGE":180000,"POPULATION_PLAN":850,"POPULATION_ENROLLED_2008":null,"X":393481.78,"Y":142779.94,"ADDRID":277548,"ZIP_CODE":20016}},{"type":"Feature","id":"9","geometry":{"type":"Point","coordinates":[-77.02507387055014,38.953976155311054]},"properties":{"OBJECTID":9,"NAME":"Truesdell Education Campus","ADDRESS":"800 INGRAHAM STREET NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-576-6202","UNGRADED":null,"TOTAL_STUD":423,"SSL":" ","GIS_ID":"dcps_327","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294497,"BLDG_NUM":327,"SCH_PROG":"327","CAPITALGAINS":"N","CAPACITY":471,"YEAR_BUILT":1908,"SQUARE_FOOTAGE":69600,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":286,"X":397826.84,"Y":142896.55000000002,"ADDRID":294497,"ZIP_CODE":20011}},{"type":"Feature","id":"90","geometry":{"type":"Point","coordinates":[-76.9337031788254,38.89700926754652]},"properties":{"OBJECTID":90,"NAME":"Aiton Elementary School","ADDRESS":"533 48TH PLACE NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6060","UNGRADED":null,"TOTAL_STUD":269,"SSL":" ","GIS_ID":"dcps_202","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294490,"BLDG_NUM":202,"SCH_PROG":"202","CAPITALGAINS":"N","CAPACITY":479,"YEAR_BUILT":1960,"SQUARE_FOOTAGE":57100,"POPULATION_PLAN":400,"POPULATION_ENROLLED_2008":357,"X":405751.28,"Y":136574.53,"ADDRID":294490,"ZIP_CODE":20019}},{"type":"Feature","id":"91","geometry":{"type":"Point","coordinates":[-76.91992926627661,38.8960014304876]},"properties":{"OBJECTID":91,"NAME":"Drew Elementary School","ADDRESS":"5600 EADS STREET NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-671-6040","UNGRADED":null,"TOTAL_STUD":181,"SSL":" ","GIS_ID":"dcps_231","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":277686,"BLDG_NUM":231,"SCH_PROG":"231","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":406946.23,"Y":136463.61000000002,"ADDRID":277686,"ZIP_CODE":20019}},{"type":"Feature","id":"92","geometry":{"type":"Point","coordinates":[-76.99231860919365,38.932283841906624]},"properties":{"OBJECTID":92,"NAME":"Luke C. Moore High School","ADDRESS":"1001 MONROE STREET NE","FACUSE":"High School/Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-281-3600","UNGRADED":0,"TOTAL_STUD":293,"SSL":" ","GIS_ID":"dcps_884","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294504,"BLDG_NUM":884,"SCH_PROG":"884","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":400666.21,"Y":140488.24,"ADDRID":294504,"ZIP_CODE":20017}},{"type":"Feature","id":"93","geometry":{"type":"Point","coordinates":[-77.06803943094211,38.966635018804]},"properties":{"OBJECTID":93,"NAME":"Lafayette Elementary School","ADDRESS":"5701 BROAD BRANCH ROAD NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-282-0116","UNGRADED":null,"TOTAL_STUD":707,"SSL":" ","GIS_ID":"dcps_261","WEB_URL":"http://www.lafayettehsa.org","ADDR_ID":294611,"BLDG_NUM":261,"SCH_PROG":"261","CAPITALGAINS":"N","CAPACITY":486,"YEAR_BUILT":1931,"SQUARE_FOOTAGE":113600,"POPULATION_PLAN":550,"POPULATION_ENROLLED_2008":623,"X":394103.71,"Y":144303.7,"ADDRID":294611,"ZIP_CODE":20015}},{"type":"Feature","id":"94","geometry":{"type":"Point","coordinates":[-76.9829065969051,38.89738346956647]},"properties":{"OBJECTID":94,"NAME":"Miner Elementary School","ADDRESS":"601 15TH STREET NE","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-397-3960","UNGRADED":null,"TOTAL_STUD":469,"SSL":" ","GIS_ID":"dcps_280","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":289548,"BLDG_NUM":280,"SCH_PROG":"280","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":401483,"Y":136614.12,"ADDRID":289548,"ZIP_CODE":20002}},{"type":"Feature","id":"95","geometry":{"type":"Point","coordinates":[-76.99718102575224,38.837745313083396]},"properties":{"OBJECTID":95,"NAME":"Hart Middle School","ADDRESS":"601 MISSISSIPPI AVENUE SE","FACUSE":"Middle School","LEVEL_":"MS","STATUS":"Active","PHONE":"202-671-6426","UNGRADED":null,"TOTAL_STUD":530,"SSL":" ","GIS_ID":"dcps_413","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspz","ADDR_ID":5534,"BLDG_NUM":413,"SCH_PROG":"413","CAPITALGAINS":"Y","CAPACITY":1110,"YEAR_BUILT":1956,"SQUARE_FOOTAGE":210700,"POPULATION_PLAN":550,"POPULATION_ENROLLED_2008":524,"X":400244.94,"Y":129993.71,"ADDRID":5534,"ZIP_CODE":20032}},{"type":"Feature","id":"96","geometry":{"type":"Point","coordinates":[-77.01924089573717,38.96586473944469]},"properties":{"OBJECTID":96,"NAME":"Whittier Education Campus","ADDRESS":"6201 5TH STREET NW","FACUSE":"Education Campus","LEVEL_":"EC","STATUS":"Active","PHONE":"202-576-6156","UNGRADED":null,"TOTAL_STUD":346,"SSL":" ","GIS_ID":"dcps_338","WEB_URL":"http://www.whittierdc.net","ADDR_ID":294614,"BLDG_NUM":338,"SCH_PROG":"338","CAPITALGAINS":"Y","CAPACITY":517,"YEAR_BUILT":1926,"SQUARE_FOOTAGE":66600,"POPULATION_PLAN":600,"POPULATION_ENROLLED_2008":365,"X":398332.71,"Y":144216.17,"ADDRID":294614,"ZIP_CODE":20011}},{"type":"Feature","id":"97","geometry":{"type":"Point","coordinates":[-77.02861484945453,38.91390874725564]},"properties":{"OBJECTID":97,"NAME":"Garrison Elementary School","ADDRESS":"1200 S STREET NW","FACUSE":"Elementary School","LEVEL_":"ES","STATUS":"Active","PHONE":"202-673-7263","UNGRADED":null,"TOTAL_STUD":237,"SSL":" ","GIS_ID":"dcps_239","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":294509,"BLDG_NUM":239,"SCH_PROG":"239","CAPITALGAINS":"N","CAPACITY":474,"YEAR_BUILT":1964,"SQUARE_FOOTAGE":60200,"POPULATION_PLAN":325,"POPULATION_ENROLLED_2008":240,"X":397518.52,"Y":138448.81,"ADDRID":294509,"ZIP_CODE":20009}},{"type":"Feature","id":"98","geometry":{"type":"Point","coordinates":[-76.92232440248637,38.89679061330222]},"properties":{"OBJECTID":98,"NAME":"H.D. Woodson High School","ADDRESS":"540 55TH STREET NE","FACUSE":"High School","LEVEL_":"SHS","STATUS":"Active","PHONE":"202-724-4632","UNGRADED":null,"TOTAL_STUD":810,"SSL":" ","GIS_ID":"dcps_426","WEB_URL":"http://dcatlas.dcgis.dc.gov/schoolprofile/schools.aspx","ADDR_ID":309633,"BLDG_NUM":425,"SCH_PROG":"425","CAPITALGAINS":"N","CAPACITY":1085,"YEAR_BUILT":1967,"SQUARE_FOOTAGE":156000,"POPULATION_PLAN":450,"POPULATION_ENROLLED_2008":263,"X":406737.85000000003,"Y":136551.42,"ADDRID":309633,"ZIP_CODE":20016}},{"type":"Feature","id":"99","geometry":{"type":"Point","coordinates":[-77.00412472481025,38.91522757595278]},"properties":{"OBJECTID":99,"NAME":"McKinley Technology High School","ADDRESS":"151 T STREET NE","FACUSE":"High School/Specialized","LEVEL_":"HS","STATUS":"Active","PHONE":"202-281-3950","UNGRADED":0,"TOTAL_STUD":670,"SSL":" ","GIS_ID":"dcps_458","WEB_URL":"http://mths.k12.dc.us/","ADDR_ID":296345,"BLDG_NUM":458,"SCH_PROG":"458","CAPITALGAINS":"N","CAPACITY":null,"YEAR_BUILT":null,"SQUARE_FOOTAGE":null,"POPULATION_PLAN":null,"POPULATION_ENROLLED_2008":null,"X":399642.48,"Y":138594.83000000002,"ADDRID":296345,"ZIP_CODE":20002}}],"name":"Education - DC","updated_at":1405036640000} --------------------------------------------------------------------------------