Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
if srid is absent from pe_list_projcs_geogcs esri file, use srid2prj …
…wkt resource file
- Loading branch information
Showing
3 changed files
with
63 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.vividsolutions.jump.io; | ||
|
||
import com.vividsolutions.jump.coordsys.EsriProj; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import java.io.File; | ||
|
||
|
||
public class ShapefileWriterTest { | ||
|
||
|
||
@Test | ||
public void testFindProjInPe_list_projcs_geogcs() throws Exception { | ||
EsriProj.setProjFile(new File("lib/ext/coord_ref_sys/pe_list_projcs_geogcs.zip"), | ||
"pe_list_projcs_geogcs.csv"); | ||
String proj = new ShapefileWriter().getPrjString("3147"); | ||
// String proj = EsriProj.findProj(3147); | ||
System.out.println(proj); | ||
Assert.assertNotNull(proj); | ||
} | ||
|
||
@Test | ||
public void testFindProjInPe_list_projcs_geogc2() throws Exception { | ||
EsriProj.setProjFile(new File("lib/ext/coord_ref_sys/pe_list_projcs_geogcs.zip"), | ||
"pe_list_projcs_geogcs.csv"); | ||
String proj = new ShapefileWriter().getPrjString("2046"); | ||
// EsriProj.setProjFile(new File("lib/ext/coord_ref_sys/pe_list_projcs_geogcs.zip"), | ||
// "pe_list_projcs_geogcs.csv"); | ||
// String proj = EsriProj.findProj(2046); | ||
System.out.println(proj); | ||
// 2046 is not in pe_list_projcs_geogcs.csv but can be found from alternative file | ||
// srid2prj.txt by EsriProj | ||
Assert.assertNotNull(proj); | ||
} | ||
} |