本文整理汇总了C++中SpatialReference::isGeographic方法的典型用法代码示例。如果您正苦于以下问题:C++ SpatialReference::isGeographic方法的具体用法?C++ SpatialReference::isGeographic怎么用?C++ SpatialReference::isGeographic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpatialReference
的用法示例。
在下文中一共展示了SpatialReference::isGeographic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateSDOEntry
void Writer::CreateSDOEntry(std::string const& block_table,
boost::uint32_t srid,
pdal::Bounds<double> bounds,
bool is3d)
{
std::ostringstream oss;
oss.setf(std::ios_base::fixed, std::ios_base::floatfield);
boost::uint32_t precision = getOptions().getValueOrDefault<boost::uint32_t>("stream_output_precision", 8);
oss.precision(precision);
std::ostringstream s_srid;
if (srid == 0)
{
s_srid << "NULL";
}
else
{
s_srid << srid;
}
double tolerance = 0.05;
pdal::Bounds<double> e = bounds;
if (srid)
{
SpatialReference ref;
ref.setFromUserInput("EPSG:"+s_srid.str());
if (ref.isGeographic())
{
// FIXME: This should be overrideable
e.setMinimum(0,-180.0);
e.setMaximum(0,180.0);
e.setMinimum(1,-90.0);
e.setMaximum(1,90.0);
e.setMinimum(2,0.0);
e.setMaximum(2,20000.0);
tolerance = 0.0005;
}
}
oss << "INSERT INTO user_sdo_geom_metadata VALUES ('" << block_table <<
"','extent', MDSYS.SDO_DIM_ARRAY(";
oss << "MDSYS.SDO_DIM_ELEMENT('X', " << e.getMinimum(0) << "," << e.getMaximum(0) <<"," << tolerance << "),"
"MDSYS.SDO_DIM_ELEMENT('Y', " << e.getMinimum(1) << "," << e.getMaximum(1) <<"," << tolerance << ")";
if (is3d)
{
oss << ",";
oss <<"MDSYS.SDO_DIM_ELEMENT('Z', "<< e.getMinimum(2) << "," << e.getMaximum(2) << "," << tolerance << ")";
}
oss << ")," << s_srid.str() << ")";
m_session->once << oss.str();
oss.str("");
}