use of org.gwtopenmaps.openlayers.client.Projection in project geo-platform by geosdi.
the class MultiLineCoverterHandler method generateGeometryWKT.
@Override
protected String generateGeometryWKT(Geometry geom, Projection dest) {
MultiLineString mls = MultiLineString.narrowToMultiLineString(geom.getJSObject());
mls.transform(new Projection(mapWidget.getMap().getProjection()), dest);
return mls.toString();
}
use of org.gwtopenmaps.openlayers.client.Projection in project geo-platform by geosdi.
the class MultiPointCoverterHandler method generateGeometryWKT.
@Override
protected String generateGeometryWKT(Geometry geom, Projection dest) {
MultiPoint multiPoint = MultiPoint.narrowToMultiPoint(geom.getJSObject());
multiPoint.transform(new Projection(mapWidget.getMap().getProjection()), dest);
return multiPoint.toString();
}
use of org.gwtopenmaps.openlayers.client.Projection in project geo-platform by geosdi.
the class PointCoverterHandler method generateGeometryWKT.
@Override
protected String generateGeometryWKT(Geometry geom, Projection dest) {
Point point = Point.narrowToPoint(geom.getJSObject());
point.transform(new Projection(mapWidget.getMap().getProjection()), dest);
return point.toString();
}
use of org.gwtopenmaps.openlayers.client.Projection in project geo-platform by geosdi.
the class PolygonConverterHandler method generateGeometryWKT.
@Override
protected String generateGeometryWKT(Geometry geom, Projection dest) {
Polygon polygon = Polygon.narrowToPolygon(geom.getJSObject());
polygon.transform(new Projection(mapWidget.getMap().getProjection()), dest);
return polygon.toString();
}
use of org.gwtopenmaps.openlayers.client.Projection in project geo-platform by geosdi.
the class FeatureDetail method buildFeature.
@Override
protected final VectorFeature buildFeature() {
checkArgument(this.geometry != null, "The Parameter geometry must not be null.");
checkArgument(((this.featureID != null) && !(this.featureID.trim().isEmpty())), "The Parameter featureID must not be null or an empty string.");
Geometry theGeom = Geometry.fromWKT(this.geometry);
theGeom.transform(new Projection(WGS_84.getCode()), new Projection(GOOGLE_MERCATOR.getCode()));
VectorFeature vectorFeature = new VectorFeature(theGeom);
vectorFeature.setFID(this.featureID);
return vectorFeature;
}
Aggregations