private void setPolygon(boolean getPoly, Envelope env) throws JsonParseException, JsonMappingException, IOException{
		@SuppressWarnings("unchecked")
		//get json file paths for given extent
		List<String> paths = jsonTree.query(env);
		//reset/create new polygons array or new tree
		if(getPoly)polygons = new Polygon[paths.size()];
		else polygonTree = new STRtree();
		//temporary path+polygon
		String jsonPathTemp;
		Polygon polygonTemp;
		//get all polygons
		for(int i=0;i<paths.size();i++){
			jsonPathTemp = GeoJsonReader.readFile(paths.get(i));
			polygonTemp = PolygonWorker.json2polygons(jsonPathTemp)[0];
			//add polygon to array or tree
			if(getPoly)polygons[i]=polygonTemp;
			else polygonTree.insert(polygonTemp.getEnvelopeInternal(), polygonTemp);
		}
	}