use of org.gwtopenmaps.openlayers.client.geometry.MultiLineString in project geo-platform by geosdi.
the class GeoPlatformSRSConverter method multiLineWKTConverter.
/**
* @param geom
* @param source
* @param dest
* @return
*/
public static String multiLineWKTConverter(Geometry geom, Projection source, Projection dest) {
MultiLineString multiLine = MultiLineString.narrowToMultiLineString(geom.getJSObject());
multiLine.transform(source, dest);
return multiLine.toString();
}
use of org.gwtopenmaps.openlayers.client.geometry.MultiLineString in project geo-platform by geosdi.
the class GPRoutingLine method drawLine.
/**
* (non-Javadoc)
*
* @see
* org.geosdi.geoplatform.gui.puregwt.routing.event.TraceRoutingLineEventHandler#drawLine(java.lang.String)
*/
@Override
public void drawLine(String wkt) {
if (this.feature != null) {
layer.removeFeature(feature);
}
MultiLineString geometry = MultiLineString.narrowToMultiLineString(Geometry.fromWKT(wkt).getJSObject());
if (geoPlatformMap.getMap().getProjection().equals(GPCoordinateReferenceSystem.GOOGLE_MERCATOR.getCode())) {
geometry.transform(new Projection(GPCoordinateReferenceSystem.WGS_84.getCode()), new Projection(GPCoordinateReferenceSystem.EPSG_GOOGLE.getCode()));
}
this.feature = new VectorFeature(geometry);
this.feature.setStyle(style);
this.layer.addFeature(feature);
this.geoPlatformMap.getMap().zoomToExtent(geometry.getBounds());
}
use of org.gwtopenmaps.openlayers.client.geometry.MultiLineString in project geo-platform by geosdi.
the class MultiLineEditorHandler method checkModifications.
@Override
protected boolean checkModifications(VectorFeature feature) {
MultiLineString oldMultiLine = MultiLineString.narrowToMultiLineString(modifyEditorControl.getSelectedFeature().getGeometry().getJSObject());
MultiLineString multiLine = MultiLineString.narrowToMultiLineString(feature.getGeometry().getJSObject());
return multiLine.equals(oldMultiLine);
}
use of org.gwtopenmaps.openlayers.client.geometry.MultiLineString in project geo-platform by geosdi.
the class WktLineGeometryBuilder method buildWktMultiGeometry.
@Override
protected final String buildWktMultiGeometry(VectorFeature feature) {
LineString line = LineString.narrowToLineString(feature.getGeometry().getJSObject());
MultiLineString multiLine = new MultiLineString(new LineString[] { line });
return multiLine.toString();
}
use of org.gwtopenmaps.openlayers.client.geometry.MultiLineString 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();
}
Aggregations