Class: Geocoder::Lookup::SampleData
- Inherits:
-
Object
- Object
- Geocoder::Lookup::SampleData
- Defined in:
- lib/sample_data.rb
Class Method Summary collapse
- .baidu_ip_202_198_16_3 ⇒ Object
- .baidu_shanghai_pearl_tower ⇒ Object
- .bing_madison_quare_garden ⇒ Object
- .cloudmake_madison_square_garden ⇒ Object
- .esri_madison_square_garder ⇒ Object
- .freegeoip_74_200_247_59 ⇒ Object
- .geocoder_ca_madison_square_garden ⇒ Object
- .geocoder_us_madison_square_garden ⇒ Object
- .geocodio_1101_pennsylvania_ave ⇒ Object
- .google_madison_square_garden ⇒ Object
- .here_madison_square_garden ⇒ Object
- .maxmind_74_200_247_59 ⇒ Object
- .nominatim_madison_square_garden ⇒ Object
- .yahoo_madison_square_garden ⇒ Object
- .yandex_kremlin ⇒ Object
Class Method Details
.baidu_ip_202_198_16_3 ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/sample_data.rb', line 20 def baidu_ip_202_198_16_3 '{ "address": "CN|北京|北京|None|CHINANET|1|None", "content": { "address": "北京市", "address_detail": { "city": "北京市", "city_code": 131, "district": "", "province": "北京市", "street": "", "street_number": "" }, "point": { "x": "116.39564504", "y": "39.92998578" } }, "status": 0 }' end |
.baidu_shanghai_pearl_tower ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/sample_data.rb', line 5 def baidu_shanghai_pearl_tower '{ "status":0, "result":{ "location":{ "lng":116.30814954222, "lat":40.056885091681 }, "precise":1, "confidence":80, "level":"\u5546\u52a1\u5927\u53a6" } }' end |
.bing_madison_quare_garden ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/sample_data.rb', line 42 def bing_madison_quare_garden '{ "authenticationResultCode":"ValidCredentials", "brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png", "copyright":"Copyright © 2011 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.", "resourceSets":[ { "estimatedTotal":1, "resources":[ { "__type":"Location:http:\/\/schemas.microsoft.com\/search\/local\/ws\/rest\/v1", "bbox":[ 40.744944289326668, -74.002353921532631, 40.755675807595253, -73.983625397086143 ], "name":"Madison Square Garden, NY", "point":{ "type":"Point", "coordinates":[ 40.75031, -73.99299 ] }, "address":{ "adminDistrict":"NY", "countryRegion":"United States", "formattedAddress":"Madison Square Garden, NY", "locality":"New York" }, "confidence":"High", "entityType":"Stadium" } ] } ], "statusCode":200, "statusDescription":"OK", "traceId":"55094ee53c8d45e789794014666328cd|CH1M001466|02.00.82.2800|CH1MSNVM001396, CH1MSNVM001370, CH1MSNVM001397" }' end |
.cloudmake_madison_square_garden ⇒ Object
85 86 87 |
# File 'lib/sample_data.rb', line 85 def cloudmake_madison_square_garden '{"found": 2, "bounds": [[40.74983, -73.99433], [40.75116, -73.99266]], "features": [{"id": 32891803,"centroid": {"type":"POINT","coordinates":[40.75111, -73.99345]},"bounds": [[40.74983, -73.99433], [40.75116, -73.99266]],"properties": {"osm_element": "way", "sport": "hockey;basketball;lacrosse", "name": "Madison Square Garden", "leisure": "stadium", "osm_id": "24801588"},"location": {"county": "New York", "country": "United States of America", "postcode": "10119", "road": "West 31st Street", "city": "New York"},"type": "Feature"},{"id": 12977552,"centroid": {"type":"POINT","coordinates":[40.75066, -73.99347]},"bounds": [[40.75066, -73.99347], [40.75066, -73.99347]],"properties": {"building": "yes", "osm_element": "node", "name": "Madison Square Garden Center", "addr:state": "NY", "osm_id": "368045579"},"location": {"county": "New York", "country": "United States of America", "postcode": "10119", "road": "West 33rd Street", "city": "New York"},"type": "Feature"}], "type": "FeatureCollection", "crs": {"type": "EPSG", "properties": {"code": 4326, "coordinate_order": [0, 1]}}}' end |
.esri_madison_square_garder ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/sample_data.rb', line 89 def esri_madison_square_garder '{ "spatialReference": { "wkid": 4326, "latestWkid": 4326 }, "locations": [ { "name": "Madison Square Garden", "extent": { "xmin": -74.000241000000003, "ymin": 40.744050000000001, "xmax": -73.988241000000002, "ymax": 40.756050000000002 }, "feature": { "geometry": { "x": -73.994238897999651, "y": 40.750049813000487 }, "attributes": { "Loc_name": "Gaz.WorldGazetteer.POI2", "Score": 100, "Match_addr": "Madison Square Garden", "Addr_type": "POI", "Type": "Sports Complex", "PlaceName": "Madison Square Garden", "Rank": "18", "AddBldg": "", "AddNum": "", "AddNumFrom": "", "AddNumTo": "", "Side": "", "StPreDir": "", "StPreType": "", "StName": "", "StType": "", "StDir": "", "Nbrhd": "", "City": "New York", "Subregion": "New York", "Region": "New York", "Postal": "10001", "PostalExt": "", "Country": "USA", "LangCode": "", "Distance": 0, "X": -73.994240000000005, "Y": 40.750050000000002, "DisplayX": -73.994240000000005, "DisplayY": 40.750050000000002, "Xmin": -74.000241000000003, "Xmax": -73.988241000000002, "Ymin": 40.744050000000001, "Ymax": 40.756050000000002 } } } ] }' end |
.freegeoip_74_200_247_59 ⇒ Object
151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/sample_data.rb', line 151 def freegeoip_74_200_247_59 '{ "city": "Plano", "region_code": "TX", "region_name": "Texas", "metrocode": "623", "zipcode": "75093", "longitude": "-96.8134", "country_name": "United States", "country_code": "US", "ip": "74.200.247.59", "latitude": "33.0347" }' end |
.geocoder_ca_madison_square_garden ⇒ Object
166 167 168 |
# File 'lib/sample_data.rb', line 166 def geocoder_ca_madison_square_garden 'test({"longt":"-73.992006","latt":"40.749101"});' end |
.geocoder_us_madison_square_garden ⇒ Object
170 171 172 |
# File 'lib/sample_data.rb', line 170 def geocoder_us_madison_square_garden '40.678107, -73.897460, 4 Pennsylvania Ave, New York, NY, 11207' end |
.geocodio_1101_pennsylvania_ave ⇒ Object
174 175 176 |
# File 'lib/sample_data.rb', line 174 def geocodio_1101_pennsylvania_ave '{"input":{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","city":"Washington","state":"DC"},"formatted_address":"1101 Pennsylvania Ave NW, Washington DC"},"results":[{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","city":"Washington","state":"DC","zip":"20004"},"formatted_address":"1101 Pennsylvania Ave NW, Washington DC, 20004","location":{"lat":38.895019,"lng":-77.028095},"accuracy":1},{"address_components":{"number":"1101","street":"Pennsylvania","suffix":"Ave","postdirectional":"NW","city":"Washington","state":"DC","zip":"20004"},"formatted_address":"1101 Pennsylvania Ave NW, Washington DC, 20004","location":{"lat":38.895016122449,"lng":-77.028084377551},"accuracy":0.8}]}' end |
.google_madison_square_garden ⇒ Object
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/sample_data.rb', line 178 def google_madison_square_garden '{ "status": "OK", "results": [ { "types": [ "street_address" ], "formatted_address": "4 Penn Plaza, New York, NY 10001, USA", "address_components": [ { "long_name": "4", "short_name": "4", "types": [ "street_number" ] }, { "long_name": "Penn Plaza", "short_name": "Penn Plaza", "types": [ "route" ] }, { "long_name": "Manhattan", "short_name": "Manhattan", "types": [ "sublocality", "political" ] }, { "long_name": "New York", "short_name": "New York", "types": [ "locality", "political" ] }, { "long_name": "New York", "short_name": "New York", "types": [ "administrative_area_level_2", "political" ] }, { "long_name": "New York", "short_name": "NY", "types": [ "administrative_area_level_1", "political" ] }, { "long_name": "United States", "short_name": "US", "types": [ "country", "political" ] }, { "long_name": "10001", "short_name": "10001", "types": [ "postal_code" ] } ], "geometry": { "location": { "lat": 40.7503540, "lng": -73.9933710 }, "location_type": "ROOFTOP", "viewport": { "southwest": { "lat": 40.7473324, "lng": -73.9965316 }, "northeast": { "lat": 40.7536276, "lng": -73.9902364 } } } } ] }' end |
.here_madison_square_garden ⇒ Object
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
# File 'lib/sample_data.rb', line 238 def here_madison_square_garden '{ "Response": { "MetaInfo": { "Timestamp": "2013-02-08T16:26:39.382+0000" }, "View": [ { "_type": "SearchResultsViewType", "ViewId": 0, "Result": [ { "Relevance": 1.0, "MatchLevel": "houseNumber", "MatchQuality": { "State": 1.0, "City": 1.0, "Street": [ 1.0 ], "HouseNumber": 1.0 }, "MatchType": "pointAddress", "Location": { "LocationId": "NT_ArsGdYbpo6dqjPQel9gTID_4", "LocationType": "point", "DisplayPosition": { "Latitude": 40.7504692, "Longitude": -73.9933777 }, "NavigationPosition": [ { "Latitude": 40.7500305, "Longitude": -73.9942398 } ], "MapView": { "TopLeft": { "Latitude": 40.7515934, "Longitude": -73.9948616 }, "BottomRight": { "Latitude": 40.7493451, "Longitude": -73.9918938 } }, "Address": { "Label": "4 Penn Plz, New York, NY 10001, United States", "Country": "USA", "State": "NY", "County": "New York", "City": "New York", "Street": "Penn Plz", "HouseNumber": "4", "PostalCode": "10001", "AdditionalData": [ { "value": "United States", "key": "CountryName" }, { "value": "New York", "key": "StateName" } ] } } } ] } ] } }' end |
.maxmind_74_200_247_59 ⇒ Object
313 314 315 |
# File 'lib/sample_data.rb', line 313 def maxmind_74_200_247_59 'US,TX,Plano,75093,33.034698,-96.813400,623,972,"Layered Technologies , US","Layered Technologies , US",' end |
.nominatim_madison_square_garden ⇒ Object
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/sample_data.rb', line 317 def nominatim_madison_square_garden '[ { "place_id": "30632629", "licence": "Data Copyright OpenStreetMap Contributors, Some Rights Reserved. CC-BY-SA 2.0.", "osm_type": "way", "osm_id": "24801588", "boundingbox": [ "40.749828338623", "40.7511596679688", "-73.9943389892578", "-73.9926528930664" ], "polygonpoints": [ [ "-73.9943346", "40.7503638" ], [ "-73.9942745", "40.7504158" ], [ "-73.9942593", "40.750629" ], [ "-73.9941343", "40.7508432" ], [ "-73.9939794", "40.7509703" ], [ "-73.9938042", "40.7510532" ], [ "-73.9938025", "40.7511311" ], [ "-73.9936051", "40.7511571" ], [ "-73.9935673", "40.751105" ], [ "-73.9934095", "40.7511089" ], [ "-73.9931235", "40.7510548" ], [ "-73.9928863", "40.7509311" ], [ "-73.9928068", "40.750949" ], [ "-73.992721", "40.7508515" ], [ "-73.9927444", "40.7507889" ], [ "-73.9926693", "40.7506457" ], [ "-73.9926597", "40.7503657" ], [ "-73.9928305", "40.7500953" ], [ "-73.9929757", "40.7499911" ], [ "-73.9931281", "40.7499238" ], [ "-73.993133", "40.7498631" ], [ "-73.9932961", "40.7498306" ], [ "-73.9933664", "40.7498742" ], [ "-73.993471", "40.7498701" ], [ "-73.9938023", "40.7499263" ], [ "-73.9940703", "40.7500756" ], [ "-73.9941876", "40.7502038" ], [ "-73.9942831", "40.7502142" ], [ "-73.9943346", "40.7503638" ] ], "lat": "40.7504928941818", "lon": "-73.993466492276", "display_name": "Madison Square Garden, West 31st Street, Long Island City, New York City, New York, 10001, United States of America", "class": "leisure", "type": "stadium", "address": { "stadium": "Madison Square Garden", "road": "West 31st Street", "suburb": "Long Island City", "city": "New York City", "county": "New York", "state": "New York", "postcode": "10001", "country": "United States of America", "country_code": "us" } } ]' end |
.yahoo_madison_square_garden ⇒ Object
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 |
# File 'lib/sample_data.rb', line 468 def yahoo_madison_square_garden '{ "bossresponse": { "responsecode": "200", "placefinder": { "start": "0", "count": "1", "request": "flags=JXTSR&location=Madison%20Square%20Garden%2C%20NY%2C%20NY&%unsafe%appid=%5B%22dj0yJmk9ZmZ5NXFrNGhNcEthJmQ9WVdrOVFUSlhPV2x1TjJVbWNHbzlORE0wT0RFME9UWXkmcz1jb25zdW1lcnNlY3JldCZ4PTAy%22%2C%20%22b57b1b98eb21f171231f5b441cba505261d6c9bb%22%5D&gflags=AC&locale=en_US", "results": [ { "quality": "90", "latitude": "40.750381", "longitude": "-73.993988", "offsetlat": "40.750381", "offsetlon": "-73.993988", "radius": "400", "boundingbox": { "north": "40.750832", "south": "40.749931", "east": "-73.993393", "west": "-73.994591" }, "name": "Madison Square Garden", "line1": "Madison Square Garden", "line2": "New York, NY 10001", "line3": "", "line4": "United States", "cross": "", "house": "", "street": "", "xstreet": "", "unittype": "", "unit": "", "postal": "10001", "neighborhood": "Garment District|Midtown|Midtown West|Manhattan", "city": "New York", "county": "New York County", "state": "New York", "country": "United States", "countrycode": "US", "statecode": "NY", "countycode": "", "timezone": "America/New_York", "areacode": "212", "uzip": "10001", "hash": "", "woeid": "23617041", "woetype": "20" } ] } } }' end |
.yandex_kremlin ⇒ Object
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/sample_data.rb', line 524 def yandex_kremlin '{ "response": { "GeoObjectCollection": { "metaDataProperty": { "GeocoderResponseMetaData": { "request": "Кремль, Moscow, Russia", "found": "1", "results": "10" } }, "featureMember": [ { "GeoObject": { "metaDataProperty": { "GeocoderMetaData": { "kind": "vegetation", "text": "Россия, Москва, Московский Кремль", "precision": "other", "AddressDetails": { "Country": { "CountryNameCode": "RU", "CountryName": "Россия", "Locality": { "LocalityName": "Москва", "Premise": { "PremiseName": "Московский Кремль" } } } } } }, "name": "Московский Кремль", "boundedBy": { "Envelope": { "lowerCorner": "37.584182 55.733361", "upperCorner": "37.650064 55.770517" } }, "Point": { "pos": "37.617123 55.751943" } } } ] } } }' end |