
eu.agrosense.client.grid.GridProvider Maven / Gradle / Ivy
The newest version!
/*
* Copyright (C) 2008-2012 AgroSense Foundation.
*
* AgroSense is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* There are special exceptions to the terms and conditions of the GPLv3 as it is applied to
* this software, see the FLOSS License Exception
* .
*
* AgroSense is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AgroSense. If not, see .
*
* Contributors:
* Timon Veenstra - initial API and implementation and/or initial documentation
*/
package eu.agrosense.client.grid;
import com.vividsolutions.jts.geom.Coordinate;
import nl.cloudfarming.client.model.EnterpriseIdProvider;
/**
*
*
*
* @author Timon Veenstra
*/
public interface GridProvider {
/**
* Create a new empty grid based on top left and bottom right
* coordinates.
* Default grid cell size is being used
* equivalent for {@link GridProvider#getDefaultGridSection(com.vividsolutions.jts.geom.Coordinate, com.vividsolutions.jts.geom.Coordinate, eu.agrosense.client.grid.GridCellSize) }
* using {@link GridProvider#getDefaultGridCellSize() } as cell size
*
* @param eip EnterpriseIdProvider, needed to generate an id for the grid, can use the AgroURI of any object in the same enterprise
* @param topLeft top left coordinate of the grid
* @param bottomRight bottom right coordinate of the grid
* @param cellSize size of the grid cells
* @return
*/
Grid getDefaultGridSection(EnterpriseIdProvider eip, Coordinate topLeft, Coordinate bottomRight);
Grid getDefaultGridSection(EnterpriseIdProvider eip, Coordinate topLeft, Coordinate bottomRight, GridCellSize cellSize);
/**
* create a new empty temporary grid based on top left and bottom right
* coordinates.
* When not provided, the default cell size is being used.
*
* @param topLeft top left coordinate of the grid
* @param bottomRight bottom right coordinate of the grid
* @param cellSize size of the grid cells
* @return
*/
Grid getTemporaryGridSection(Coordinate topLeft, Coordinate bottomRight);
Grid getTemporaryGridSection(Coordinate topLeft, Coordinate bottomRight, GridCellSize cellSize);
/**
* Get the system default grid size
*
* @return
*/
GridCellSize getDefaultGridCellSize();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy