本文整理汇总了Java中com.vividsolutions.jts.geom.MultiPolygon.getSRID方法的典型用法代码示例。如果您正苦于以下问题:Java MultiPolygon.getSRID方法的具体用法?Java MultiPolygon.getSRID怎么用?Java MultiPolygon.getSRID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vividsolutions.jts.geom.MultiPolygon
的用法示例。
在下文中一共展示了MultiPolygon.getSRID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: marshal
import com.vividsolutions.jts.geom.MultiPolygon; //导入方法依赖的package包/类
@Override
public String marshal(MultiPolygon the_geom) throws ParseException {
if (the_geom != null) {
WKTWriter wktWriter = new WKTWriter();
if (the_geom.getSRID() == 0)
the_geom.setSRID(4326);
return wktWriter.write(the_geom);
} else {
throw new ParseException("Geometry obj is null.");
}
}
示例2: createMultiPolygon
import com.vividsolutions.jts.geom.MultiPolygon; //导入方法依赖的package包/类
/**
* Creates the multi polygon.
*
* @param pol
* the pol
* @return the multi polygon
*/
public MultiPolygon createMultiPolygon(Polygon[] pol)
{
MultiPolygon multiPoly = this.factory.createMultiPolygon(pol);
if (multiPoly.getSRID() == 0)
{
multiPoly.setSRID(4326);
}
return multiPoly;
}
示例3: createWKTFromMultiPolygon
import com.vividsolutions.jts.geom.MultiPolygon; //导入方法依赖的package包/类
/**
* Creates the wkt from multi polygon.
*
* @param multiPoly
* the multi poly
* @return the string
* @throws ParseException
* the parse exception
*/
public String createWKTFromMultiPolygon(MultiPolygon multiPoly) throws ParseException
{
if (multiPoly.getSRID() == 0)
{
multiPoly.setSRID(4326);
}
return this.multiPolAdapter.marshal(multiPoly);
}