Search in sources :

Example 1 with LineString

use of org.gwtopenmaps.openlayers.client.geometry.LineString in project geo-platform by geosdi.

the class LineStringEditorHandler method checkModifications.

@Override
protected boolean checkModifications(VectorFeature feature) {
    LineString oldLine = LineString.narrowToLineString(modifyEditorControl.getSelectedFeature().getGeometry().getJSObject());
    LineString li = LineString.narrowToLineString(feature.getGeometry().getJSObject());
    return li.equals(oldLine);
}
Also used : LineString(org.gwtopenmaps.openlayers.client.geometry.LineString)

Example 2 with LineString

use of org.gwtopenmaps.openlayers.client.geometry.LineString in project geo-platform by geosdi.

the class LineStringConverterHandler method generateGeometryWKT.

@Override
protected String generateGeometryWKT(Geometry geom, Projection dest) {
    LineString lineString = LineString.narrowToLineString(geom.getJSObject());
    lineString.transform(new Projection(mapWidget.getMap().getProjection()), dest);
    return lineString.toString();
}
Also used : LineString(org.gwtopenmaps.openlayers.client.geometry.LineString) Projection(org.gwtopenmaps.openlayers.client.Projection)

Example 3 with LineString

use of org.gwtopenmaps.openlayers.client.geometry.LineString in project geo-platform by geosdi.

the class LineRequestHandler method checkModifications.

@Override
public boolean checkModifications(VectorFeature feature) {
    LineString oldLine = LineString.narrowToLineString(control.getSelectedFeature().getGeometry().getJSObject());
    LineString li = LineString.narrowToLineString(feature.getGeometry().getJSObject());
    return li.equals(oldLine);
}
Also used : LineString(org.gwtopenmaps.openlayers.client.geometry.LineString)

Example 4 with LineString

use of org.gwtopenmaps.openlayers.client.geometry.LineString in project geo-platform by geosdi.

the class GeoPlatformSRSConverter method lineWKTConverter.

/**
 * Convert Geometry LineString SRS from Projection Source to Dest This
 * Operation is possible but remember to add PROJ4 in your project to have
 * support for conversion that you want to do.
 *
 * @param geom
 * @param source
 * @param dest
 * @return
 */
public static String lineWKTConverter(Geometry geom, Projection source, Projection dest) {
    LineString line = LineString.narrowToLineString(geom.getJSObject());
    line.transform(source, dest);
    return line.toString();
}
Also used : MultiLineString(org.gwtopenmaps.openlayers.client.geometry.MultiLineString) LineString(org.gwtopenmaps.openlayers.client.geometry.LineString)

Example 5 with LineString

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

Aggregations

LineString (org.gwtopenmaps.openlayers.client.geometry.LineString)5 MultiLineString (org.gwtopenmaps.openlayers.client.geometry.MultiLineString)2 Projection (org.gwtopenmaps.openlayers.client.Projection)1