Geomajas, Geomajas server: Main - commands 1.15.1

org.geomajas.command.geometry
Class GeometryAreaCommand

java.lang.Object
  extended by 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

Constructor Summary
GeometryAreaCommand()
           
 
Method Summary
 void execute(GeometryAreaRequest request, GeometryAreaResponse response)
          Calculate the geographical area for each of the requested geometries.
 GeometryAreaResponse getEmptyCommandResponse()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryAreaCommand

public GeometryAreaCommand()
Method Detail

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 parameters
response - response object
Throws:
Exception - in case of problems

Geomajas, Geomajas server: Main - commands 1.15.1

Copyright © 2014 Geosparc. All Rights Reserved.