Skip to content

Commit

Permalink
Update scraper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
handelaar committed Jul 3, 2017
1 parent f2c160b commit 6eb8b38
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions scraper.php
Expand Up @@ -19,10 +19,10 @@
$test = file_get_contents('http://gis.fingal.ie/arcgis/rest/services/Planning/PlanningApplicationsWeb/MapServer/2/query?f=json&where=PLANNING_REFERENCE%3D%27F17A%2F0314%27&returnGeometry=true&spatialRel=esriSpatialRelIntersects&maxAllowableOffset=0.00001&outFields=*&outSR=4326');
$application = json_decode($test);
$geojson = makeGeoJSON($application->features[0]->geometry);
#$geojson=json_encode(json_decode($geojson), JSON_PRETTY_PRINT);

$polygon = geoPHP::load(json_encode($application),'json');
echo $geojson . "\n\n\n\n...done!";
$geojson=json_encode(json_decode($geojson), JSON_PRETTY_PRINT);
echo $geojson;
$polygon = geoPHP::load($geojson,'json');
echo "\n\n\n\n...done!";

exit();

Expand All @@ -41,30 +41,8 @@ function makeGeoJson($object) {
return $geojson;
}

/* $geojson = '{ "type": "Feature",


//
{
"type": "Feature",
"bbox": [-10.0, -10.0, 10.0, 10.0],
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-10.0, -10.0],
[10.0, -10.0],
[10.0, 10.0],
[-10.0, -10.0]
]
]
}
//...
}
*/

// // Read in a page
// $html = scraperwiki::scrape("http://foo.com");
//
Expand Down

0 comments on commit 6eb8b38

Please sign in to comment.