336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
private String getType(String filename)
{
EndianDataInputStream edis = null;
int type = 0;
try{
edis = new EndianDataInputStream(new FileInputStream(filename));
ShapefileHeader header = new ShapefileHeader(edis);
type = header.getShapeType();
}catch(Exception e){
e.printStackTrace();
}finally
{
try{
if (edis != null)
edis.close();
}catch(Exception ioe){ioe.printStackTrace();}
}
switch (type) {
case (Shapefile.NULL):
return ("Null");
case (Shapefile.POINT):
case (Shapefile.POINTZ):
case (Shapefile.POINTM):
return ("Point");
case (Shapefile.ARC):
case (Shapefile.ARCM):
case (Shapefile.ARCZ):
return ("LineString");
case (Shapefile.POLYGON):
case (Shapefile.POLYGONM):
case (Shapefile.POLYGONZ):
return ("Polygon");
case (Shapefile.MULTIPOINT):
case (Shapefile.MULTIPOINTM):
case (Shapefile.MULTIPOINTZ):
return ("Point");
default:
return ("Undefined");
}
}