Revision 40366
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/AbstractPrimitive.java | ||
---|---|---|
7 | 7 |
|
8 | 8 |
import com.vividsolutions.jts.geom.Coordinate; |
9 | 9 |
import com.vividsolutions.jts.geom.GeometryFactory; |
10 |
import com.vividsolutions.jts.io.WKBWriter; |
|
10 | 11 |
import com.vividsolutions.jts.operation.distance.DistanceOp; |
11 | 12 |
import com.vividsolutions.jts.operation.overlay.snap.GeometrySnapper; |
12 | 13 |
|
... | ... | |
24 | 25 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
25 | 26 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
26 | 27 |
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
28 |
import org.gvsig.fmap.geom.operation.towkb.ToWKBOperationContext; |
|
27 | 29 |
import org.gvsig.fmap.geom.primitive.Envelope; |
28 | 30 |
import org.gvsig.fmap.geom.primitive.FShape; |
29 | 31 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
... | ... | |
536 | 538 |
return (byte[]) this.invokeOperation(OPERATIONS.CONVERTTOWKB, null); |
537 | 539 |
} |
538 | 540 |
|
541 |
public byte[] convertToWKB(int srs) throws GeometryOperationNotSupportedException, |
|
542 |
GeometryOperationException { |
|
543 |
WKBWriter write = new WKBWriter(); |
|
544 |
return write.write(Converter.geometryToJtsWithSRID(this,srs)); |
|
545 |
} |
|
546 |
|
|
539 | 547 |
public String convertToWKT() throws GeometryOperationNotSupportedException, |
540 | 548 |
GeometryOperationException { |
541 | 549 |
return (String) this.invokeOperation(OPERATIONS.CONVERTTOWKT, null); |
branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/Geometry.java | ||
---|---|---|
431 | 431 |
* @return the WKB version of the geometry |
432 | 432 |
*/ |
433 | 433 |
public byte[] convertToWKB() throws GeometryOperationNotSupportedException, |
434 |
GeometryOperationException;
|
|
434 |
GeometryOperationException; |
|
435 | 435 |
|
436 |
public byte[] convertToWKB(int srs) throws GeometryOperationNotSupportedException, |
|
437 |
GeometryOperationException; |
|
438 |
|
|
436 | 439 |
/** |
437 | 440 |
* Return a string with the equivalent in WKT format of the Geometry. |
438 | 441 |
* |
Also available in: Unified diff