Revision 43405
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.api/src/main/java/org/gvsig/fmap/geom/GeometryManager.java | ||
---|---|---|
1336 | 1336 |
public MultiSurface createMultiSurface(GeneralPathX generalPathX, |
1337 | 1337 |
int subType) throws CreateGeometryException; |
1338 | 1338 |
|
1339 |
public InformationbuilderWithGeometrySupport createInformacionBuilder(); |
|
1339 |
public InformationbuilderWithGeometrySupport createInformacionBuilder(); |
|
1340 |
|
|
1341 |
/** |
|
1342 |
* Check if geomTypeChild is a geoemtry type deribed of geomTypeParent |
|
1343 |
* |
|
1344 |
* @param geomTypeParent |
|
1345 |
* @param geomTypeChild |
|
1346 |
* @return |
|
1347 |
*/ |
|
1348 |
public boolean isSubtype(int geomTypeParent, int geomTypeChild); |
|
1340 | 1349 |
|
1341 | 1350 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.jts/src/main/java/org/gvsig/fmap/geom/jts/DefaultGeometryManager.java | ||
---|---|---|
837 | 837 |
public InformationbuilderWithGeometrySupport createInformacionBuilder() { |
838 | 838 |
return new BaseInformationBuilderWithGeometrySupport(); |
839 | 839 |
} |
840 |
|
|
840 |
|
|
841 |
@Override |
|
842 |
public boolean isSubtype(int geomTypeParent, int geomTypeChild) { |
|
843 |
// Esto es un implementacion patatera que habria que mejorar, |
|
844 |
// pero mejor aqui que esparcida por todas partes en donde se |
|
845 |
// necesite. |
|
846 |
if( geomTypeParent == geomTypeChild ) { |
|
847 |
return true; |
|
848 |
} |
|
849 |
switch(geomTypeParent) { |
|
850 |
case Geometry.TYPES.MULTICURVE: |
|
851 |
return geomTypeChild==Geometry.TYPES.MULTILINE ; |
|
852 |
case Geometry.TYPES.MULTIPOLYGON: |
|
853 |
return geomTypeChild==Geometry.TYPES.MULTIPOLYGON ; |
|
854 |
case Geometry.TYPES.MULTIPOINT: |
|
855 |
return geomTypeChild==Geometry.TYPES.MULTIPOINT ; |
|
856 |
case Geometry.TYPES.CURVE: |
|
857 |
return geomTypeChild==Geometry.TYPES.LINE ; |
|
858 |
case Geometry.TYPES.POLYGON: |
|
859 |
return geomTypeChild==Geometry.TYPES.POLYGON ; |
|
860 |
case Geometry.TYPES.POINT: |
|
861 |
return geomTypeChild==Geometry.TYPES.POINT ; |
|
862 |
} |
|
863 |
return false; |
|
864 |
} |
|
841 | 865 |
} |
Also available in: Unified diff