org.geomajas.command.geometry
Class GeometryAreaCommand
java.lang.Object
org.geomajas.command.geometry.GeometryAreaCommand
- All Implemented Interfaces:
- Command<GeometryAreaRequest,GeometryAreaResponse>
@Component
@Api
public class GeometryAreaCommand
- extends Object
- implements Command<GeometryAreaRequest,GeometryAreaResponse>
This command calculates the (approximate) geographical area of a geometry.
- Since:
- 1.11.0
- Author:
- Jan De Moerloose
GeometryAreaCommand
public GeometryAreaCommand()
getEmptyCommandResponse
public GeometryAreaResponse getEmptyCommandResponse()
- Specified by:
getEmptyCommandResponse in interface Command<GeometryAreaRequest,GeometryAreaResponse>
execute
public void execute(GeometryAreaRequest request,
GeometryAreaResponse response)
throws Exception
- Calculate the geographical area for each of the requested geometries. The current algorithm uses the global
sinusoidal projection (a so-called equal-area projection) and assumes a spherical earth. More accurate
projections exist (Albers, Mollweide, ...) but they are more complicated and cause tolerance problems when
directly applied with Geotools transformations.
- Specified by:
execute in interface Command<GeometryAreaRequest,GeometryAreaResponse>
- Parameters:
request - request parametersresponse - response object
- Throws:
Exception - in case of problems
Copyright © 2014 Geosparc. All Rights Reserved.