Search in sources :

Example 21 with Projection

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();
}
Also used : MultiLineString(org.gwtopenmaps.openlayers.client.geometry.MultiLineString) Projection(org.gwtopenmaps.openlayers.client.Projection)

Example 22 with Projection

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();
}
Also used : MultiPoint(org.gwtopenmaps.openlayers.client.geometry.MultiPoint) Projection(org.gwtopenmaps.openlayers.client.Projection)

Example 23 with Projection

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();
}
Also used : Projection(org.gwtopenmaps.openlayers.client.Projection) Point(org.gwtopenmaps.openlayers.client.geometry.Point)

Example 24 with Projection

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();
}
Also used : Projection(org.gwtopenmaps.openlayers.client.Projection) Polygon(org.gwtopenmaps.openlayers.client.geometry.Polygon)

Example 25 with Projection

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;
}
Also used : Geometry(org.gwtopenmaps.openlayers.client.geometry.Geometry) VectorFeature(org.gwtopenmaps.openlayers.client.feature.VectorFeature) Projection(org.gwtopenmaps.openlayers.client.Projection)

Aggregations

Projection (org.gwtopenmaps.openlayers.client.Projection)25 Bounds (org.gwtopenmaps.openlayers.client.Bounds)13 BBoxClientInfo (org.geosdi.geoplatform.gui.configuration.map.client.geometry.BBoxClientInfo)9 VectorFeature (org.gwtopenmaps.openlayers.client.feature.VectorFeature)5 MultiPolygon (org.gwtopenmaps.openlayers.client.geometry.MultiPolygon)3 WMS (org.gwtopenmaps.openlayers.client.layer.WMS)3 WMSOptions (org.gwtopenmaps.openlayers.client.layer.WMSOptions)3 WMSParams (org.gwtopenmaps.openlayers.client.layer.WMSParams)3 GPClientViewport (org.geosdi.geoplatform.gui.configuration.map.client.GPClientViewport)2 MultiLineString (org.gwtopenmaps.openlayers.client.geometry.MultiLineString)2 Point (org.gwtopenmaps.openlayers.client.geometry.Point)2 GwtDevice (org.eclipse.kapua.app.console.shared.model.GwtDevice)1 GeocodingVectorFeature (org.geosdi.geoplatform.gui.client.widget.map.feature.GeocodingVectorFeature)1 GPLayerBean (org.geosdi.geoplatform.gui.model.GPLayerBean)1 LonLat (org.gwtopenmaps.openlayers.client.LonLat)1 Map (org.gwtopenmaps.openlayers.client.Map)1 MapOptions (org.gwtopenmaps.openlayers.client.MapOptions)1 Size (org.gwtopenmaps.openlayers.client.Size)1 Style (org.gwtopenmaps.openlayers.client.Style)1 SelectFeature (org.gwtopenmaps.openlayers.client.control.SelectFeature)1