|
From: <bma...@us...> - 2011-04-13 15:50:47
|
Revision: 6213
http://fudaa.svn.sourceforge.net/fudaa/?rev=6213&view=rev
Author: bmarchan
Date: 2011-04-13 15:50:37 +0000 (Wed, 13 Apr 2011)
Log Message:
-----------
Mascaret : Lecture/restitution des limites de lit (stockage + rives)
Modified Paths:
--------------
trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/layer/MdlModel1dAxe.java
trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/controller/BiefImporterFromModels.java
trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/controller/ControllerBief.java
trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/model/ProfilContainerAdapter.java
trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/model/UtilsBief1d.java
Modified: trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/layer/MdlModel1dAxe.java
===================================================================
--- trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/layer/MdlModel1dAxe.java 2011-04-13 15:48:46 UTC (rev 6212)
+++ trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/layer/MdlModel1dAxe.java 2011-04-13 15:50:37 UTC (rev 6213)
@@ -29,7 +29,8 @@
GISAttributeConstants.TITRE,
GISAttributeConstants.NATURE,
GISAttributeConstants.VISIBILITE,
- GISAttributeConstants.LABEL
+ GISAttributeConstants.LABEL,
+ GISAttributeConstants.CURVILIGNE_DECALAGE
};
// Pas de container de commande pour cette op\xE9ration, sinon conserv\xE9 en undo/redo.
getGeomData().setAttributes(attrs, null);
Modified: trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/controller/BiefImporterFromModels.java
===================================================================
--- trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/controller/BiefImporterFromModels.java 2011-04-13 15:48:46 UTC (rev 6212)
+++ trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/controller/BiefImporterFromModels.java 2011-04-13 15:50:37 UTC (rev 6213)
@@ -234,11 +234,11 @@
while (attrIsCorrectlyValued&&++i<profils_.getNombre()) {
// V\xE9rification de la pr\xE9sence des donn\xE9es PK \\
String CommHydrauValue=(String)profils_.getGeomData().getValue(idxAttCommentaireHydraulique, i);
- attrIsCorrectlyValued=GISLib.isHydroCommentValued(CommHydrauValue, "PK");
+ attrIsCorrectlyValued=GISLib.isHydroCommentValued(CommHydrauValue, GISAttributeConstants.ATT_COMM_HYDRO_PK);
// V\xE9rification de la coh\xE9rence avec l'axe hydraulique \\
if (presenceAxeHydraulique) {
- double hydraoCommValue=GISLib.getHydroCommentDouble(CommHydrauValue, "PK");
+ double hydraoCommValue=GISLib.getHydroCommentDouble(CommHydrauValue, GISAttributeConstants.ATT_COMM_HYDRO_PK);
double absCurvValue=UtilsProfil1d.abscisseCurviligne(axeHydraulique_.getGeomData().getCoordinateSequence(0), profils_
.getGeomData().getCoordinateSequence(i));
if (absCurvValue==-1)
@@ -265,7 +265,7 @@
idxAttCommentaireHydraulique=zone.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO);
for (int k=0; k<zone.getNumGeometries(); k++) {
String comm=(String)profils_.getGeomData().getValue(idxAttCommentaireHydraulique, k);
- if (!GISLib.isHydroCommentValued(comm, "PK")) {
+ if (!GISLib.isHydroCommentValued(comm, GISAttributeConstants.ATT_COMM_HYDRO_PK)) {
double pk;
if (presenceAxeHydraulique) {
// Valuation avec le croisement avec l'axe hydraulique
@@ -276,7 +276,7 @@
// Valuation avec le d\xE9calage de l'axe.
pk=decalAxe;
}
- zone.setAttributValue(idxAttCommentaireHydraulique, k, GISLib.setHydroCommentDouble(comm, pk, "PK"), null);
+ zone.setAttributValue(idxAttCommentaireHydraulique, k, GISLib.setHydroCommentDouble(comm, pk, GISAttributeConstants.ATT_COMM_HYDRO_PK), null);
}
}
attrMatchWithAxeHydraulique=true;
@@ -294,7 +294,7 @@
// Valuation avec le croisement avec l'axe hydraulique
double pk=UtilsProfil1d.abscisseCurviligne(axeHydraulique_.getGeomData().getCoordinateSequence(0), profils_
.getGeomData().getCoordinateSequence(k))+decalAxe;
- zone.setAttributValue(idxAttCommentaireHydraulique, k, GISLib.setHydroCommentDouble(comm, pk, "PK"), null);
+ zone.setAttributValue(idxAttCommentaireHydraulique, k, GISLib.setHydroCommentDouble(comm, pk, GISAttributeConstants.ATT_COMM_HYDRO_PK), null);
}
}
else {
Modified: trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/controller/ControllerBief.java
===================================================================
--- trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/controller/ControllerBief.java 2011-04-13 15:48:46 UTC (rev 6212)
+++ trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/controller/ControllerBief.java 2011-04-13 15:50:37 UTC (rev 6213)
@@ -112,8 +112,8 @@
GISZoneCollectionLigneBrisee zone=getBiefContainer().getZoneProfils();
for (int i=0; i<zone.getNbGeometries(); i++) {
String value=(String)zone.getValue(zone.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO), i);
- double oldval=GISLib.getHydroCommentDouble(value, "PK");
- String s=GISLib.setHydroCommentDouble(value, oldval+decal, "PK");
+ double oldval=GISLib.getHydroCommentDouble(value, GISAttributeConstants.ATT_COMM_HYDRO_PK);
+ String s=GISLib.setHydroCommentDouble(value, oldval+decal, GISAttributeConstants.ATT_COMM_HYDRO_PK);
zone.setAttributValue(zone.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO), i, s, cmp);
}
@@ -280,9 +280,9 @@
}
else {
decalBief1=GISLib.getHydroCommentDouble((String)zone1.getValue(zone1.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO),
- 0), "PK");
+ 0), GISAttributeConstants.ATT_COMM_HYDRO_PK);
decalBief2=GISLib.getHydroCommentDouble((String)zone2.getValue(zone2.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO),
- 0), "PK");
+ 0), GISAttributeConstants.ATT_COMM_HYDRO_PK);
}
// R\xE9cup\xE9ration de la longueur des biefs \\
@@ -297,10 +297,10 @@
// Pas d'axe hydro => On calcule les longueurs a partir des PK profils.
else {
longBief1=GISLib.getHydroCommentDouble((String)zone1.getValue(zone1.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO),
- zone1.getNumGeometries()-1), "PK")
+ zone1.getNumGeometries()-1), GISAttributeConstants.ATT_COMM_HYDRO_PK)
-decalBief1;
longBief2=GISLib.getHydroCommentDouble((String)zone2.getValue(zone2.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO),
- zone2.getNumGeometries()-1), "PK")
+ zone2.getNumGeometries()-1), GISAttributeConstants.ATT_COMM_HYDRO_PK)
-decalBief2;
}
@@ -426,16 +426,16 @@
for (int i=0; i<bief1.profils_.getNombre(); i++) {
int idxGeom=zoneProfils.addGeometry(bief1ZoneProfil.getGeometry(i), UtilsProfil1d.getData(i, bief1ZoneProfil), null);
String comm=(String)zoneProfils.getValue(idxAttrComm, idxGeom);
- double newPK=GISLib.getHydroCommentDouble(comm, "PK")+offsetBief1;
- String newValue=GISLib.setHydroCommentDouble(comm, newPK, "PK");
+ double newPK=GISLib.getHydroCommentDouble(comm, GISAttributeConstants.ATT_COMM_HYDRO_PK)+offsetBief1;
+ String newValue=GISLib.setHydroCommentDouble(comm, newPK, GISAttributeConstants.ATT_COMM_HYDRO_PK);
zoneProfils.setAttributValue(idxAttrComm, idxGeom, newValue, null);
}
// Ajout des profil du bief 2, en d\xE9calant eventuellement les PK.
for (int i=0; i<bief2.profils_.getNombre(); i++) {
int idxGeom=zoneProfils.addGeometry(bief2ZoneProfil.getGeometry(i), UtilsProfil1d.getData(i, bief2ZoneProfil), null);
String comm=(String)zoneProfils.getValue(idxAttrComm, idxGeom);
- double newPK=GISLib.getHydroCommentDouble(comm, "PK")+offsetBief2;
- String newValue=GISLib.setHydroCommentDouble(comm, newPK, "PK");
+ double newPK=GISLib.getHydroCommentDouble(comm, GISAttributeConstants.ATT_COMM_HYDRO_PK)+offsetBief2;
+ String newValue=GISLib.setHydroCommentDouble(comm, newPK, GISAttributeConstants.ATT_COMM_HYDRO_PK);
zoneProfils.setAttributValue(idxAttrComm, idxGeom, newValue, null);
}
Modified: trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/model/ProfilContainerAdapter.java
===================================================================
--- trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/model/ProfilContainerAdapter.java 2011-04-13 15:48:46 UTC (rev 6212)
+++ trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/model/ProfilContainerAdapter.java 2011-04-13 15:50:37 UTC (rev 6213)
@@ -403,7 +403,7 @@
return -1;
GISZoneCollection zone=biefContainer_.getZoneProfils();
String value=(String)zone.getValue(zone.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO), idxProfilSelected_);
- return GISLib.getHydroCommentDouble(value, "PK");
+ return GISLib.getHydroCommentDouble(value, GISAttributeConstants.ATT_COMM_HYDRO_PK);
}
/**
@@ -414,7 +414,7 @@
return;
GISZoneCollection zone=biefContainer_.getZoneProfils();
String value=(String)zone.getValue(zone.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO), idxProfilSelected_);
- String s=GISLib.setHydroCommentDouble(value, _abs, "PK");
+ String s=GISLib.setHydroCommentDouble(value, _abs, GISAttributeConstants.ATT_COMM_HYDRO_PK);
zone.setAttributValue(zone.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO), idxProfilSelected_, s, _cmd);
fireProfilContainerDataModified();
}
@@ -684,16 +684,16 @@
if (zone.getNumGeometries()==1)
return false;
if (idxProfilSelected_==0) {
- if (GISLib.getHydroCommentDouble((String)zone.getValue(idxAttrComm, 1), "PK")<_pk)
+ if (GISLib.getHydroCommentDouble((String)zone.getValue(idxAttrComm, 1), GISAttributeConstants.ATT_COMM_HYDRO_PK)<_pk)
return true;
}
else if (idxProfilSelected_<zone.getNumGeometries()-1) {
- if (GISLib.getHydroCommentDouble((String)zone.getValue(idxAttrComm, idxProfilSelected_-1), "PK")>_pk
- ||GISLib.getHydroCommentDouble((String)zone.getValue(idxAttrComm, idxProfilSelected_+1), "PK")<_pk)
+ if (GISLib.getHydroCommentDouble((String)zone.getValue(idxAttrComm, idxProfilSelected_-1), GISAttributeConstants.ATT_COMM_HYDRO_PK)>_pk
+ ||GISLib.getHydroCommentDouble((String)zone.getValue(idxAttrComm, idxProfilSelected_+1), GISAttributeConstants.ATT_COMM_HYDRO_PK)<_pk)
return true;
}
else if (idxProfilSelected_==zone.getNumGeometries()-1)
- if (GISLib.getHydroCommentDouble((String)zone.getValue(idxAttrComm, idxProfilSelected_-1), "PK")>_pk)
+ if (GISLib.getHydroCommentDouble((String)zone.getValue(idxAttrComm, idxProfilSelected_-1), GISAttributeConstants.ATT_COMM_HYDRO_PK)>_pk)
return true;
return false;
}
Modified: trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/model/UtilsBief1d.java
===================================================================
--- trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/model/UtilsBief1d.java 2011-04-13 15:48:46 UTC (rev 6212)
+++ trunk/soft/fudaa-modeleur/src/main/java/org/fudaa/fudaa/modeleur/modeleur1d/model/UtilsBief1d.java 2011-04-13 15:50:37 UTC (rev 6213)
@@ -22,7 +22,7 @@
* Quelques fonctions concernant les biefs.
*
* @author Emmanuel MARTIN
- * @version $Id:$
+ * @version $Id$
*/
public class UtilsBief1d {
/**
@@ -95,7 +95,7 @@
for (int j=0; j<_profils.getNombre(); j++) {
GISZoneCollection zone=_profils.getGeomData();
String value=(String)zone.getValue(zone.getIndiceOf(GISAttributeConstants.COMMENTAIRE_HYDRO), j);
- idxAbsCurv[j]=new Object[]{j, GISLib.getHydroCommentDouble(value, "PK")};
+ idxAbsCurv[j]=new Object[]{j, GISLib.getHydroCommentDouble(value, GISAttributeConstants.ATT_COMM_HYDRO_PK)};
}
// Tri en fonction des abcsisses curvilignes
Arrays.sort((Object[])idxAbsCurv, new Comparator<Object>() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|