From: <bma...@us...> - 2008-11-07 11:06:49
|
Revision: 4189 http://fudaa.svn.sourceforge.net/fudaa/?rev=4189&view=rev Author: bmarchan Date: 2008-11-07 11:06:41 +0000 (Fri, 07 Nov 2008) Log Message: ----------- Chgt mineur sur nom g?\195?\169om?\195?\169trie r?\195?\169cup?\195?\169r?\195?\169e. Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2008-11-07 10:48:51 UTC (rev 4188) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2008-11-07 11:06:41 UTC (rev 4189) @@ -118,7 +118,7 @@ if (str != null) { lignes.add(str); if ("".equals(name)) { - names.add(CtuluLib.getS(isSt_?"P":"_N")+((GISGeometry)str).getId()); + names.add(CtuluLib.getS(isSt_?"P":"N")+((GISGeometry)str).getId()); } else { names.add(name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <emm...@us...> - 2009-01-27 15:45:33
|
Revision: 4409 http://fudaa.svn.sourceforge.net/fudaa/?rev=4409&view=rev Author: emmanuel_martin Date: 2009-01-27 15:45:31 +0000 (Tue, 27 Jan 2009) Log Message: ----------- Tache #162 : "Import de fichiers rubar : conserver les points confondus" Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2009-01-27 15:45:30 UTC (rev 4408) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2009-01-27 15:45:31 UTC (rev 4409) @@ -66,6 +66,8 @@ if (in_ == null) { return null; } + // Vrai si les points dupliqu\xE9 doivent le rester. + boolean keepDuplicatePoints=true; in_.setJumpBlankLine(true); in_.setBlankZero(true); in_.setCommentInOneField("#"); @@ -94,7 +96,7 @@ while (!isSep(first) && !isSep(sec)) { Coordinate coordinate = new Coordinate(in_.doubleField(0), in_.doubleField(1), in_.doubleField(2)); // dans les fichier st, il se peut qu'il y ait des points en double, donc on fait ce test: - if (last == null || !last.equals2D(coordinate)) { + if (last == null || keepDuplicatePoints || !last.equals2D(coordinate)) { coordinatesEnCours.add(coordinate); last = coordinate; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bma...@us...> - 2009-03-05 16:57:44
|
Revision: 4511 http://fudaa.svn.sourceforge.net/fudaa/?rev=4511&view=rev Author: bmarchan Date: 2009-03-05 16:57:34 +0000 (Thu, 05 Mar 2009) Log Message: ----------- Tache #193 : Conservation de l'ordre des lignes directrices fichiers rubar ST. Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2009-03-05 16:02:15 UTC (rev 4510) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/dodico/src/org/fudaa/dodico/rubar/io/RubarStReader.java 2009-03-05 16:57:34 UTC (rev 4511) @@ -68,6 +68,7 @@ } // Vrai si les points dupliqu\xE9 doivent le rester. boolean keepDuplicatePoints=true; + in_.setJumpBlankLine(true); in_.setBlankZero(true); in_.setCommentInOneField("#"); @@ -77,16 +78,19 @@ final List<String> names=new ArrayList<String>(200); final List<String> pks=new ArrayList<String>(200); final List<Coordinate> coordinatesEnCours = new ArrayList<Coordinate>(); - // Contient les listes de coordonn\xE9es pour les lignes directrices (Map<String,ArrayList<Coordinate>> en Java 1.5) - final Map<String, List<Coordinate>> mdirs=new HashMap<String, List<Coordinate>>(20); + + // Listes des coordonn\xE9es pour les lignes directrices + final List<List<Coordinate>> lcoordldir=new ArrayList<List<Coordinate>>(20); + // Liste des noms des lignes directrices + final List<String> lnameldirs=new ArrayList<String>(20); final int[] fmt = new int[] { 13, 13, 13, 1, 3 }; final int[] fmt1Line=new int[]{6,6,6,6,13,1,42}; Coordinate last = null; String name=""; String pk=""; + try { - while (true) { if (isSt_) { in_.readFields(fmt1Line); @@ -107,11 +111,16 @@ // Ligne directrice eventuelle. Pas de controle que la ligne directrice est bien sur tous les profils. String namedir=in_.stringField(4).trim(); if (!"".equals(namedir)) { - List<Coordinate> coordldir=(List<Coordinate>)mdirs.get(namedir); - if (coordldir==null) { + List<Coordinate> coordldir; + int ind=lnameldirs.indexOf(namedir); + if (ind==-1) { coordldir=new ArrayList<Coordinate>(200); - mdirs.put(namedir,coordldir); + lnameldirs.add(namedir); + lcoordldir.add(coordldir); } + else { + coordldir=lcoordldir.get(ind); + } coordldir.add((Coordinate) last.clone()); } @@ -181,13 +190,13 @@ } // Lignes directrices - if (mdirs.size()>0) { + if (lnameldirs.size()>0) { final GISZoneCollectionLigneBrisee zdirs = new GISZoneCollectionLigneBrisee(null); // Pour \xEAtre sur de la correspondance nom/coordonn\xE9es - String[] namedirs=(String[])mdirs.keySet().toArray(new String[0]); + String[] namedirs=lnameldirs.toArray(new String[0]); LineString[] ldirs=new LineString[namedirs.length]; for (int i=0; i<namedirs.length; i++) { - ldirs[i]=GISLib.createLineOrLinearFromList((List<Coordinate>)(mdirs.get(namedirs[i]))); + ldirs[i]=GISLib.createLineOrLinearFromList(lcoordldir.get(i)); } zdirs.addAllLineStringClosedOrNode(ldirs, null); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |