Revision: 5016
          http://sourceforge.net/p/jump-pilot/code/5016
Author:   michaudm
Date:     2016-09-11 13:44:55 +0000 (Sun, 11 Sep 2016)
Log Message:
-----------
Better Unit management

Modified Paths:
--------------
    core/trunk/src/org/openjump/core/ccordsys/utils/SRSInfo.java
    core/trunk/src/org/openjump/core/ccordsys/utils/SridLookupTable.java
    core/trunk/src/org/openjump/core/rasterimage/TiffTags.java

Added Paths:
-----------
    core/trunk/src/jumptest/ccordsys/UnitTest.java
    core/trunk/src/org/openjump/core/ccordsys/Quantity.java
    core/trunk/src/org/openjump/core/ccordsys/Unit.java

Added: core/trunk/src/jumptest/ccordsys/UnitTest.java
===================================================================
--- core/trunk/src/jumptest/ccordsys/UnitTest.java                              
(rev 0)
+++ core/trunk/src/jumptest/ccordsys/UnitTest.java      2016-09-11 13:44:55 UTC 
(rev 5016)
@@ -0,0 +1,32 @@
+package jumptest.ccordsys;
+
+import junit.framework.TestCase;
+import org.openjump.core.ccordsys.Unit;
+import org.openjump.core.ccordsys.utils.SRSInfo;
+import org.openjump.core.rasterimage.TiffTags;
+
+import java.io.File;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Created by UMichael on 11/09/2016.
+ */
+public class UnitTest extends TestCase {
+
+    public void testFindFromLengthName() throws Exception {
+        assertEquals("unit METRE from metre", Unit.METRE, Unit.find("metre"));
+        assertEquals("unit METRE from metres", Unit.METRE, 
Unit.find("metres"));
+        assertEquals("unit METRE from m\xE8tre", Unit.METRE, 
Unit.find("m\xE8tre"));
+        assertEquals("unit METRE from METRE", Unit.METRE, Unit.find("METRE"));
+        assertEquals("unit METRE from METER", Unit.METRE, Unit.find("METER"));
+        assertEquals("unit METRE from m", Unit.METRE, Unit.find("m"));
+        assertEquals("unit METRE from 9001", Unit.METRE, Unit.find("9001"));
+    }
+
+    public void testFindFromAngleName() throws Exception {
+        assertEquals("unit DEGREE from degree", Unit.DEGREE, 
Unit.find("degree"));
+        assertEquals("unit DEGREE from deg", Unit.DEGREE, Unit.find("deg"));
+        assertEquals("unit DEGREE from name", Unit.DEGREE, Unit.find("9102"));
+    }
+}

Added: core/trunk/src/org/openjump/core/ccordsys/Quantity.java
===================================================================
--- core/trunk/src/org/openjump/core/ccordsys/Quantity.java                     
        (rev 0)
+++ core/trunk/src/org/openjump/core/ccordsys/Quantity.java     2016-09-11 
13:44:55 UTC (rev 5016)
@@ -0,0 +1,6 @@
+package org.openjump.core.ccordsys;
+
+/**
+ * Quantity (used by Unit)
+ */
+public enum Quantity {UNKNOWN, LENGTH, ANGLE}

Added: core/trunk/src/org/openjump/core/ccordsys/Unit.java
===================================================================
--- core/trunk/src/org/openjump/core/ccordsys/Unit.java                         
(rev 0)
+++ core/trunk/src/org/openjump/core/ccordsys/Unit.java 2016-09-11 13:44:55 UTC 
(rev 5016)
@@ -0,0 +1,152 @@
+package org.openjump.core.ccordsys;
+
+import java.text.Normalizer;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.openjump.core.ccordsys.Quantity.ANGLE;
+import static org.openjump.core.ccordsys.Quantity.LENGTH;
+
+/**
+ * List of UOM is created from ESG database with the following code :
+ * SELECT
+ *     rpad(upper(regexp_replace(unit_of_meas_name,'[ ''\\(\\)-]+','_','g')), 
16) || '(' ||
+ *     rpad('"' || unit_of_meas_name || '"', 32, ' ') || ', ' ||
+ *     uom_code::text || ', ' ||
+ *     rpad(upper(unit_of_meas_type), 6) || ', ' ||
+ *     rpad((coalesce(factor_b,0)/coalesce(factor_c,1))::text, 21, ' ') || ', 
' ||
+ *     '"m"' || '),'
+ * FROM epsg_unitofmeasure
+ * WHERE deprecated = 0 AND unit_of_meas_type IN ('length','angle') AND 
uom_code > 9000
+ * ORDER BY uom_code
+ *
+ * Some handwriting reformatting/correction are necessary though
+ * Some abbreviations have been found in 
http://w3.energistics.org/uom/poscUnits22.xml
+ */
+public enum Unit {
+    UNKNOWN         ("Unknown", 0,                 Quantity.UNKNOWN, 0.0       
           , ""),
+    METRE           ("metre"                         , 9001, LENGTH, 1         
           , "m"),
+    FOOT            ("foot"                          , 9002, LENGTH, 0.3048    
           , "ft"),
+    US_SURVEY_FOOT  ("US survey foot"                , 9003, LENGTH, 
0.304800609601219    , "ftUS"),
+    CLARKE_S_FOOT   ("Clarke's foot"                 , 9005, LENGTH, 
0.3047972654         , "ftCla"),
+    FATHOM          ("fathom"                        , 9014, LENGTH, 1.8288    
           , "fathom"),
+    NAUTICAL_MILE   ("nautical mile"                 , 9030, LENGTH, 1852      
           , "nmi"),
+    GERMAN_METER    ("German legal metre"            , 9031, LENGTH, 
1.0000135965         , "mGer"),
+    US_SURVEY_CHAIN ("US survey chain"               , 9033, LENGTH, 
20.1168402336805     , "chUS"),
+    US_SURVEY_LINK  ("US survey link"                , 9034, LENGTH, 
0.201168402336805    , "lkUS"),
+    US_SURVEY_MILE  ("US survey mile"                , 9035, LENGTH, 
1609.34721869444     , "miUS"),
+    KILOMETRE       ("kilometre"                     , 9036, LENGTH, 1000.0    
           , "km"),
+    CLARKE_S_YARD   ("Clarke's yard"                 , 9037, LENGTH, 
0.9143917962         , "ydCla"),
+    CLARKE_S_CHAIN  ("Clarke's chain"                , 9038, LENGTH, 
20.1166195164        , "chCla"),
+    CLARKE_S_LINK   ("Clarke's link"                 , 9039, LENGTH, 
0.201166195164       , "lkCla"),
+    SEARS_YARD      ("British yard (Sears 1922)"     , 9040, LENGTH, 
0.914398414616029    , "ydSe"),
+    SEARS_FOOT      ("British foot (Sears 1922)"     , 9041, LENGTH, 
0.304799471538676    , "ftSe"),
+    SEARS_CHAIN     ("British chain (Sears 1922)"    , 9042, LENGTH, 
20.1167651215526     , "chSe"),
+    SEARS_LINK      ("British link (Sears 1922)"     , 9043, LENGTH, 
0.201167651215526    , "lkSe"),
+    BENOIT_YARD_A   ("British yard (Benoit 1895 A)"  , 9050, LENGTH, 0.9143992 
           , "ydBnA"),
+    BENOIT_FOOT_A   ("British foot (Benoit 1895 A)"  , 9051, LENGTH, 
0.304799733333333    , "ftBnA"),
+    BENOIT_CHAIN_A  ("British chain (Benoit 1895 A)" , 9052, LENGTH, 
20.1167824           , "chBnA"),
+    BENOIT_LINK_A   ("British link (Benoit 1895 A)"  , 9053, LENGTH, 
0.201167824          , "lkBnA"),
+    BENOIT_YARD_B   ("British yard (Benoit 1895 B)"  , 9060, LENGTH, 
0.914399204289812    , "ydBnB"),
+    BENOIT_FOOT_B   ("British foot (Benoit 1895 B)"  , 9061, LENGTH, 
0.304799734763271    , "ftBnB"),
+    BENOIT_CHAIN_B  ("British chain (Benoit 1895 B)" , 9062, LENGTH, 
20.1167824943759     , "chBnB"),
+    BENOIT_LINK_B   ("British link (Benoit 1895 B)"  , 9063, LENGTH, 
0.201167824943759    , "lkBnB"),
+    BRITISH_FOOT_65 ("British foot (1865)"           , 9070, LENGTH, 
0.304800833333333    , "ftBr(65)"),
+    INDIAN_FOOT     ("Indian foot"                   , 9080, LENGTH, 
0.304799510248147    , "ftInd"),
+    INDIAN_FOOT_1937("Indian foot (1937)"            , 9081, LENGTH, 
0.30479841           , "ftInd(37)"),
+    INDIAN_FOOT_1962("Indian foot (1962)"            , 9082, LENGTH, 0.3047996 
           , "ftInd(62)"),
+    INDIAN_FOOT_1975("Indian foot (1975)"            , 9083, LENGTH, 0.3047995 
           , "ftInd(75)"),
+    INDIAN_YARD     ("Indian yard"                   , 9084, LENGTH, 
0.914398530744441    , "ydInd"),
+    INDIAN_YARD_1937("Indian yard (1937)"            , 9085, LENGTH, 
0.91439523           , "ydInd(1937)"),
+    INDIAN_YARD_1962("Indian yard (1962)"            , 9086, LENGTH, 0.9143988 
           , "ydInd(1962)"),
+    INDIAN_YARD_1975("Indian yard (1975)"            , 9087, LENGTH, 0.9143985 
           , "ydInd(1975)"),
+    STATUTE_MILE    ("Statute mile"                  , 9093, LENGTH, 1609.344  
           , "miUS"),
+    GOLD_COAST_FOOT ("Gold Coast foot"               , 9094, LENGTH, 
0.304799710181509    , "ftGC"),
+    BRITISH_FOOT_36 ("British foot (1936)"           , 9095, LENGTH, 
0.3048007491         , "ftBr(36)"),
+    YARD            ("yard"                          , 9096, LENGTH, 0.9144    
           , "yd"),
+    CHAIN           ("chain"                         , 9097, LENGTH, 20.1168   
           , "ch"),
+    LINK            ("link"                          , 9098, LENGTH, 0.201168  
           , "lk"),
+    SEARS_YARD_TR   ("British yard (Sears 1922 truncated)", 9099, LENGTH, 
0.914398        , "ydSeTr"),
+    RADIAN          ("radian"                        , 9101, ANGLE , 1.0       
           , "rad"),
+    DEGREE          ("degree"                        , 9102, ANGLE , 
0.0174532925199433   , "deg"),
+    ARC_MINUTE      ("arc-minute"                    , 9103, ANGLE , 
0.000290888208665721 , "min"),
+    ARC_SECOND      ("arc-second"                    , 9104, ANGLE , 
4.84813681109535e-006, "sec"),
+    GRAD            ("grad"                          , 9105, ANGLE , 
0.015707963267949    , "gr"),
+    DMS             ("degree minute second"          , 9107, ANGLE , 0         
           , ""),
+    DMSH            ("degree minute second hemisphere", 9108, ANGLE , 0        
            , ""),
+    MICRORADIAN     ("microradian"                   , 9109, ANGLE , 1e-006    
           , "\u00B5m"),
+    SEXAGESIMAL_DMS ("sexagesimal DMS"               , 9110, ANGLE , 0         
           , ""),
+    SEXAGESIMAL_DM  ("sexagesimal DM"                , 9111, ANGLE , 0         
           , ""),
+    CENTESIMAL_MIN  ("centesimal minute"             , 9112, ANGLE , 
0.000157079632679489 , "cgr"),
+    CENTESIMAL_SEC  ("centesimal second"             , 9113, ANGLE , 
1.5707963267949e-006 , "ccgr"),
+    MIL_6400        ("mil_6400"                      , 9114, ANGLE , 
0.000981747704246809 , "mil"),
+    DEGREE_MINUTE   ("degree minute"                 , 9115, ANGLE , 0         
           , ""),
+    DEGREE_HEM      ("degree hemisphere"             , 9116, ANGLE , 0         
           , ""),
+    HEM_DEGREE      ("hemisphere degree"             , 9117, ANGLE , 0         
           , ""),
+    DMH             ("degree minute hemisphere"      , 9118, ANGLE , 0         
           , ""),
+    HDM             ("hemisphere degree minute"      , 9119, ANGLE , 0         
           , ""),
+    HDMS            ("hemisphere degree minute sec"  , 9120, ANGLE , 0         
           , ""),
+    SEXA_DMS_S      ("sexagesimal DMS.s"             , 9121, ANGLE , 0         
           , ""),
+    DEGREE_SUPPLIER_("degree (supplier to define representation)", 9122, ANGLE 
, 0.0174532925199433, ""),
+    SEARS_FOOT_TR   ("British foot (Sears 1922 truncated)", 9300, LENGTH, 
0.304799333333333,"ftSe"),
+    SEARS_CHAIN_TR  ("British chain (Sears 1922 truncated)", 9301, LENGTH, 
20.116756      , "chSe"),
+    SEARS_LINK_TR   ("British link (Sears 1922 truncated)", 9302, LENGTH, 
0.20116756      , "lkSe");
+
+
+    private String name;
+    private int epsgCode;
+    private Quantity quantity;
+    private double siFactor;
+    private String abbreviation;
+    static Map<String,Unit> map = new HashMap<>();
+
+    static {
+        for (Unit u : Unit.values()) {
+            map.put(u.name().toLowerCase(), u);
+            map.put(Integer.toString(u.getEpsgCode()), u);
+            if (u.getAbbreviation().length()>0) map.put(u.getAbbreviation(), 
u);
+        }
+    }
+
+    Unit(String name, int epsgCode, Quantity quantity, double siFactor, String 
abbreviation) {
+        this.name = name;
+        this.epsgCode = epsgCode;
+        this.quantity = quantity;
+        this.siFactor = siFactor;
+        this.abbreviation = abbreviation;
+    }
+
+    String getName() {
+        return name;
+    }
+
+    int getEpsgCode() {
+        return epsgCode;
+    }
+
+    Quantity getQuantity() {
+        return quantity;
+    }
+
+    double getSIFactor() {
+        return siFactor;
+    }
+
+    String getAbbreviation() {
+        return abbreviation;
+    }
+
+    public static Unit find(String nameOrCode) {
+        if (nameOrCode.trim().length() == 0) return UNKNOWN;
+        nameOrCode = Normalizer.normalize(nameOrCode, Normalizer.Form.NFD); // 
separe base character from accent
+        nameOrCode = nameOrCode.replaceAll("\\p{M}", ""); // remove accents
+        nameOrCode = nameOrCode.toLowerCase();
+        nameOrCode = nameOrCode.replaceAll("feet","foot");
+        nameOrCode = nameOrCode.replaceAll("meter","metre");
+        nameOrCode = nameOrCode.replaceAll("grade","grad");
+        nameOrCode = 
nameOrCode.replaceAll("(metre|yard|mile|degree|grad|radian)s\\b","$1");
+        Unit u = map.get(nameOrCode);
+        return u;
+    }
+
+}

Modified: core/trunk/src/org/openjump/core/ccordsys/utils/SRSInfo.java
===================================================================
--- core/trunk/src/org/openjump/core/ccordsys/utils/SRSInfo.java        
2016-09-10 20:09:23 UTC (rev 5015)
+++ core/trunk/src/org/openjump/core/ccordsys/utils/SRSInfo.java        
2016-09-11 13:44:55 UTC (rev 5016)
@@ -1,11 +1,12 @@
 package org.openjump.core.ccordsys.utils;
 
+import org.openjump.core.ccordsys.Unit;
+
 import java.io.UnsupportedEncodingException;
 
 import static org.openjump.core.ccordsys.utils.SRSInfo.Registry.EPSG;
 import static org.openjump.core.ccordsys.utils.SRSInfo.Registry.ESRI;
 import static org.openjump.core.ccordsys.utils.SRSInfo.Registry.SRID;
-import static org.openjump.core.ccordsys.utils.SRSInfo.Unit.UNKNOWN;
 
 /**
  * Small container for SRS information.
@@ -19,13 +20,22 @@
 
     public enum Registry{SRID, EPSG, ESRI, IGNF, SRORG}
 
-    public enum Unit {UNKNOWN, METER, FOOT, YARD, MILE, RADIAN, DEGREE, GRADE, 
DMS, DMSH}
+    //public enum Unit {
+    //    UNKNOWN,
+    //    METRE,
+    //    FOOT, FOOT_US_SURVEY, FOOT_MODIFIED_AMERICAN, FOOT_CLARKE, 
FOOT_INDIAN,
+    //    LINK, LINK_BENOIT, LINK_SEARS,
+    //    CHAIN_BENOIT, CHAIN_SEARS,
+    //    YARD_SEARS, YARD_INDIAN,
+    //    FATHOM,
+    //    MILE_INTERNATIONAL_NAUTICAL,
+    //    RADIAN, DEGREE, ARC_MINUTE, ARC_SECOND, GRAD, GON, DMS, 
DMS_HEMISPHERE}
 
     private String source;            // The source of SRS information (ex. 
prj file path)
     private Registry registry = EPSG; // The registry in which this SRS is 
referenced
     private String code = UNDEFINED;  // The code of the SRS
     private String description = "";  // The name or description of the SRS
-    private Unit unit = UNKNOWN;      // The unit used by this SRS
+    private Unit unit = Unit.UNKNOWN; // The unit used by this SRS
 
     public SRSInfo() {}
 

Modified: core/trunk/src/org/openjump/core/ccordsys/utils/SridLookupTable.java
===================================================================
--- core/trunk/src/org/openjump/core/ccordsys/utils/SridLookupTable.java        
2016-09-10 20:09:23 UTC (rev 5015)
+++ core/trunk/src/org/openjump/core/ccordsys/utils/SridLookupTable.java        
2016-09-11 13:44:55 UTC (rev 5016)
@@ -8,7 +8,7 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.openjump.core.ccordsys.utils.SRSInfo.Unit;
+import org.openjump.core.ccordsys.Unit;
 
 /**
  * A class to lookup in srid.txt.
@@ -59,7 +59,7 @@
                     if (m.group(1).equals(code)) {
                         srsInfo .setCode(m.group(1))
                                 .setDescription(m.group(2))
-                                .setUnit(getUnitFromString(m.group(3)));
+                                .setUnit(Unit.find(m.group(3)));
                     }
                 }
             }
@@ -80,7 +80,7 @@
                     if (normalize(m.group(2)).equals(normalize(name))) {
                         srsInfo .setCode(m.group(1))
                                 .setDescription(m.group(2))
-                                .setUnit(getUnitFromString(m.group(3)));
+                                .setUnit(Unit.find(m.group(3)));
                     }
                 }
             }
@@ -102,7 +102,7 @@
                             
normalize(m.group(2)).equals(normalize(codeOrName))) {
                         srsInfo .setCode(m.group(1))
                                 .setDescription(m.group(2))
-                                .setUnit(getUnitFromString(m.group(3)));
+                                .setUnit(Unit.find(m.group(3)));
                     }
                 }
             }
@@ -131,10 +131,6 @@
         return srsInfo == null ? null : srsInfo.getUnit();
     }
 
-    private static Unit getUnitFromString(String u){
-        return Unit.valueOf(u.toUpperCase().replaceAll("METRE","METER"));
-    }
-
     /**
      * Use this function to normalize srs name and get a chance to match it
      * with the one in srid.txt

Modified: core/trunk/src/org/openjump/core/rasterimage/TiffTags.java
===================================================================
--- core/trunk/src/org/openjump/core/rasterimage/TiffTags.java  2016-09-10 
20:09:23 UTC (rev 5015)
+++ core/trunk/src/org/openjump/core/rasterimage/TiffTags.java  2016-09-11 
13:44:55 UTC (rev 5016)
@@ -12,6 +12,7 @@
 import org.apache.commons.imaging.formats.tiff.TiffImageParser;
 import org.apache.commons.imaging.formats.tiff.fieldtypes.FieldType;
 import org.libtiff.jai.codec.XTIFF;
+import org.openjump.core.ccordsys.Unit;
 import org.openjump.core.ccordsys.utils.SRSInfo;
 
 public class TiffTags {
@@ -121,19 +122,20 @@
                     int coordSystemType = offset;
                     // default unit for geographic CRS
                     if (coordSystemType == 
GeoTiffConstants.ModelTypeGeographic)
-                        srsInfo.setUnit(SRSInfo.Unit.DEGREE);
+                        srsInfo.setUnit(Unit.DEGREE);
                     // default unit for projected CRS
                     else if (coordSystemType == 
GeoTiffConstants.ModelTypeProjected)
-                        srsInfo.setUnit(SRSInfo.Unit.METER);
+                        srsInfo.setUnit(Unit.METRE);
                     break;
                 //case GeoTiffConstants.GTRasterTypeGeoKey:
                 //    srsInfo.rasterType = offset;
                 //    break;
                 case GeoTiffConstants.GTCitationGeoKey:
                     break;
-                case GeoTiffConstants.GeographicTypeGeoKey:
-                case GeoTiffConstants.ProjectedCSTypeGeoKey:
+                case GeoTiffConstants.GeographicTypeGeoKey:  // 2048
+                case GeoTiffConstants.ProjectedCSTypeGeoKey: // 3072
                     value = getGeoValue(location, count, offset, 
geoDoubleParams, geoAsciiParams);
+                    System.out.println("!!!!!" + value);
                     if (value instanceof String)
                         srsInfo.setDescription((String)value);
                     else if (value instanceof Integer) {
@@ -152,21 +154,22 @@
                     break;
                 case GeoTiffConstants.GeogLinearUnitsGeoKey:
                 case GeoTiffConstants.GeogAngularUnitsGeoKey:
-                    if (offset == GeoTiffConstants.Angular_Degree) 
srsInfo.setUnit(SRSInfo.Unit.DEGREE);
-                    if (offset == GeoTiffConstants.Angular_Radian) 
srsInfo.setUnit(SRSInfo.Unit.RADIAN);
-                    if (offset == GeoTiffConstants.Angular_Grad) 
srsInfo.setUnit(SRSInfo.Unit.GRADE);
-                    if (offset == GeoTiffConstants.Angular_DMS) 
srsInfo.setUnit(SRSInfo.Unit.DMS);
-                    if (offset == GeoTiffConstants.Angular_DMS_Hemisphere) 
srsInfo.setUnit(SRSInfo.Unit.DMSH);
+                    //if (offset == GeoTiffConstants.Angular_Degree) 
srsInfo.setUnit(Unit.DEGREE);
+                    //if (offset == GeoTiffConstants.Angular_Radian) 
srsInfo.setUnit(Unit.RADIAN);
+                    //if (offset == GeoTiffConstants.Angular_Grad) 
srsInfo.setUnit(Unit.GRAD);
+                    //if (offset == GeoTiffConstants.Angular_DMS) 
srsInfo.setUnit(Unit.DMS);
+                    //if (offset == GeoTiffConstants.Angular_DMS_Hemisphere) 
srsInfo.setUnit(Unit.DMSH);
                 case GeoTiffConstants.ProjLinearUnitsGeoKey:
-                    if (offset == GeoTiffConstants.Linear_Meter) 
srsInfo.setUnit(SRSInfo.Unit.METER);
-                    if (offset == GeoTiffConstants.Linear_Foot) 
srsInfo.setUnit(SRSInfo.Unit.FOOT);
-                    if (offset == GeoTiffConstants.Linear_Foot_Clarke) 
srsInfo.setUnit(SRSInfo.Unit.FOOT);
-                    if (offset == GeoTiffConstants.Linear_Foot_Indian) 
srsInfo.setUnit(SRSInfo.Unit.FOOT);
-                    if (offset == GeoTiffConstants.Linear_Foot_US_Survey) 
srsInfo.setUnit(SRSInfo.Unit.FOOT);
-                    if (offset == 
GeoTiffConstants.Linear_Foot_Modified_American) 
srsInfo.setUnit(SRSInfo.Unit.FOOT);
-                    if (offset == GeoTiffConstants.Linear_Yard_Indian) 
srsInfo.setUnit(SRSInfo.Unit.YARD);
-                    if (offset == GeoTiffConstants.Linear_Yard_Sears) 
srsInfo.setUnit(SRSInfo.Unit.YARD);
-                    if (offset == 
GeoTiffConstants.Linear_Mile_International_Nautical) 
srsInfo.setUnit(SRSInfo.Unit.MILE);
+                    srsInfo.setUnit(Unit.find(Integer.toString(offset)));
+                    //if (offset == GeoTiffConstants.Linear_Meter) 
srsInfo.setUnit(Unit.METRE);
+                    //if (offset == GeoTiffConstants.Linear_Foot) 
srsInfo.setUnit(Unit.FOOT);
+                    //if (offset == GeoTiffConstants.Linear_Foot_Clarke) 
srsInfo.setUnit(Unit.CLARKE_S_FOOT);
+                    //if (offset == GeoTiffConstants.Linear_Foot_Indian) 
srsInfo.setUnit(Unit.INDIAN_FOOT);
+                    //if (offset == GeoTiffConstants.Linear_Foot_US_Survey) 
srsInfo.setUnit(Unit.US_SURVEY_FOOT);
+                    //if (offset == 
GeoTiffConstants.Linear_Foot_Modified_American) srsInfo.setUnit(Unit.US);
+                    //if (offset == GeoTiffConstants.Linear_Yard_Indian) 
srsInfo.setUnit(SRSInfo.Unit.YARD);
+                    //if (offset == GeoTiffConstants.Linear_Yard_Sears) 
srsInfo.setUnit(SRSInfo.Unit.YARD);
+                    //if (offset == 
GeoTiffConstants.Linear_Mile_International_Nautical) 
srsInfo.setUnit(SRSInfo.Unit.MILE);
             }
         }
     }


------------------------------------------------------------------------------
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to