stateplane.patch

Antonio Falciano, 09/23/2017 06:26 PM

Download (4.09 KB)

View differences:

org.gvsig.projection.jcrs.lib/src/main/java/org/gvsig/crs/CrsFactory.java (copia locale)
395 395
        conn.setConnectionEPSG();
396 396

  
397 397
        String sql = "SELECT coord_ref_sys_code FROM EPSG_COORDINATEREFERENCESYSTEM WHERE coord_ref_sys_kind = '"
398
        		+ kind + "' AND REPLACE(REPLACE(LOWER(coord_ref_sys_name),' / ',' '),'-',' ') LIKE '%"
398
                + kind + "' AND REPLACE(REPLACE(LOWER(coord_ref_sys_name),' / ',' '),'-',' ') LIKE '%"
399 399
                + normalizeESRI(source_sr_name) + "%' AND deprecated = 0";
400 400
        logger.debug(sql);
401 401

  
......
481 481
                String source_proj4 = sr.ExportToProj4();
482 482
                String target_proj4 = target_sr.ExportToProj4();
483 483
                if (StringUtils.equals(source_proj4, target_proj4)) {
484
                	conn.close();
484
                    conn.close();
485 485
                    logger.debug("ESRI:{} matches!", code);
486 486
                    return code;
487 487
                }
488 488
            } catch (Exception e) {
489
                logger.debug("gvSIG can't identify the ESRI code...");
489
                //logger.debug("Can't identify the ESRI code...");
490 490
            }
491 491
        }
492 492
        
493 493
        conn.close();
494
        logger.debug("gvSIG can't identify the ESRI code...");
494
        logger.debug("Can't identify the ESRI code...");
495 495
        return code0;
496 496
    }
497 497

  
......
510 510
        name = StringUtils.replace(name, "_CSRS", "(CSRS)");
511 511
        name = StringUtils.replace(name, "_DEF_1976", "(76)");
512 512
        name = StringUtils.replace(name, "_ED77", "(ED77)");
513
        name = StringUtils.replace(name, "_ft", "(ft)");
514
        name = StringUtils.replace(name, "_ftUS", "(ftUS)");
515 513
        name = StringUtils.replace(name, "_HARN", "(HARN)");
516 514
        name = StringUtils.replace(name, "_MA11", "(MA11)");
517 515
        name = StringUtils.replace(name, "_NSRS2007", "(NSRS2007)");
518 516
        name = StringUtils.replace(name, "_PA11", "(PA11)");
519
        name = StringUtils.replace(name, "_Paris", " (Paris)");
520 517
        name = StringUtils.replace(name, "_StatePlane", "");
521
        if (StringUtils.contains(name, "_FIPS")) name = StringUtils.split(name, "_FIPS")[0];
522
        if (StringUtils.endsWith(name, "_m")) name = StringUtils.replace(name, "_m", "(m)");
518
        name = StringUtils.replaceAll(name, "(_FIPS_)\\d{4}", "");
519
        name = StringUtils.replaceAll(name, "_m$", "(m)");
523 520
        
524 521
        name = StringUtils.replace(name, "1870_Madrid", "1870 (Madrid)");
525 522
        name = StringUtils.replace(name, "83_2011", "83(2011)"); // e.g. NAD_1983_2011 --> NAD83(2011)
523
        name = StringUtils.replaceAll(name, "Feet_Intl$", "(ft)");
524
        name = StringUtils.replaceAll(name, "Feet$", "(ftUS)");
526 525
        name = StringUtils.replace(name, "Ferro", "(Ferro)");
526
        name = StringUtils.replaceAll(name, "ftUS$", "(ftUS)");
527
        name = StringUtils.replaceAll(name, "ft$", "(ft)");
527 528
        name = StringUtils.replace(name, "Hungarian_1972", "HD72");
528 529
        name = StringUtils.replace(name, "Indonesian_1974", "ID74");
529
        name = StringUtils.replace(name, "TC_1948", "TC(1948)");
530
        name = StringUtils.replace(name, "Lisboa", "Lisbon");
531
        name = StringUtils.replace(name, "Lisbon_Lisbon", "Lisbon (Lisbon)");
530 532
        name = StringUtils.replace(name, "MGI_M", "MGI Austria M"); //"MGI_M" --> "MGI / Austria M"
531 533
        name = StringUtils.replace(name, "New_Brunswick_Stereographic", "New Brunswick Stereographic (ATS77)");
532
        name = StringUtils.replace(name, "Lisboa", "Lisbon");
533
        name = StringUtils.replace(name, "Lisbon_Lisbon", "Lisbon (Lisbon)");
534 534
        name = StringUtils.replace(name, "Oslo_Norway", "(Oslo) NGO");
535
        name = StringUtils.replace(name, "Paris", "(Paris)");
536
        name = StringUtils.replace(name, "TC_1948", "TC(1948)");
537
        
535 538
        name = StringUtils.replace(name, "_", " ");
536 539
        name = StringUtils.lowerCase(name);
537 540
        return name;