本文整理汇总了C++中TileMap::generateTileSets方法的典型用法代码示例。如果您正苦于以下问题:C++ TileMap::generateTileSets方法的具体用法?C++ TileMap::generateTileSets怎么用?C++ TileMap::generateTileSets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TileMap
的用法示例。
在下文中一共展示了TileMap::generateTileSets方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create
TileMap* TileMap::create(const TileSource* tileSource, const Profile* profile)
{
TileMap* tileMap = new TileMap();
tileMap->setTitle( tileSource->getName() );
tileMap->setProfileType( profile->getProfileType() );
const GeoExtent& ex = profile->getExtent();
tileMap->_srs = getHorizSRSString(profile->getSRS()); //srs();
tileMap->_vsrs = profile->getSRS()->getVertInitString(); //profile->getVerticalSRS() ? profile->getVerticalSRS()->getInitString() : 0L;
tileMap->_originX = ex.xMin();
tileMap->_originY = ex.yMin();
tileMap->_minX = ex.xMin();
tileMap->_minY = ex.yMin();
tileMap->_maxX = ex.xMax();
tileMap->_maxY = ex.yMax();
profile->getNumTiles( 0, tileMap->_numTilesWide, tileMap->_numTilesHigh );
tileMap->_format.setWidth( tileSource->getPixelsPerTile() );
tileMap->_format.setHeight( tileSource->getPixelsPerTile() );
tileMap->_format.setExtension( tileSource->getExtension() );
tileMap->generateTileSets();
return tileMap;
}
示例2: TileMap
TileMap*
TileMap::create(const std::string& url,
const Profile* profile,
const std::string& format,
int tile_width,
int tile_height)
{
//Profile profile(type);
const GeoExtent& ex = profile->getExtent();
TileMap* tileMap = new TileMap();
tileMap->setProfileType(profile->getProfileType()); //type);
tileMap->setExtents(ex.xMin(), ex.yMin(), ex.xMax(), ex.yMax());
tileMap->setOrigin(ex.xMin(), ex.yMin());
tileMap->_filename = url;
tileMap->_srs = getHorizSRSString(profile->getSRS());
tileMap->_vsrs = profile->getSRS()->getVertInitString();
//tileMap->_vsrs = profile->getVerticalSRS() ? profile->getVerticalSRS()->getInitString() : "";
tileMap->_format.setWidth( tile_width );
tileMap->_format.setHeight( tile_height );
tileMap->_format.setExtension( format );
profile->getNumTiles( 0, tileMap->_numTilesWide, tileMap->_numTilesHigh );
tileMap->generateTileSets();
tileMap->computeMinMaxLevel();
return tileMap;
}
示例3: e
TileMap*
TileMap::create(const std::string& url,
const Profile* profile,
const DataExtentList& dataExtents,
const std::string& format,
int tile_width,
int tile_height)
{
const GeoExtent& ex = profile->getExtent();
TileMap* tileMap = new TileMap();
tileMap->setProfileType(profile->getProfileType());
tileMap->setExtents(ex.xMin(), ex.yMin(), ex.xMax(), ex.yMax());
tileMap->setOrigin(ex.xMin(), ex.yMin());
tileMap->_filename = url;
tileMap->_srs = getHorizSRSString(profile->getSRS());
tileMap->_vsrs = profile->getSRS()->getVertInitString();
tileMap->_format.setWidth( tile_width );
tileMap->_format.setHeight( tile_height );
profile->getNumTiles( 0, tileMap->_numTilesWide, tileMap->_numTilesHigh );
// format can be a mime-type or an extension:
std::string::size_type p = format.find('/');
if ( p == std::string::npos )
{
tileMap->_format.setExtension(format);
tileMap->_format.setMimeType( Registry::instance()->getMimeTypeForExtension(format) );
}
else
{
tileMap->_format.setMimeType(format);
tileMap->_format.setExtension( Registry::instance()->getExtensionForMimeType(format) );
}
//Add the data extents
tileMap->getDataExtents().insert(tileMap->getDataExtents().end(), dataExtents.begin(), dataExtents.end());
// If we have some data extents specified then make a nicer bounds than the
if (!tileMap->getDataExtents().empty())
{
// Get the union of all the extents
GeoExtent e(tileMap->getDataExtents()[0]);
for (unsigned int i = 1; i < tileMap->getDataExtents().size(); i++)
{
e.expandToInclude(tileMap->getDataExtents()[i]);
}
// Convert the bounds to the output profile
GeoExtent bounds = e.transform(profile->getSRS());
tileMap->setExtents(bounds.xMin(), bounds.yMin(), bounds.xMax(), bounds.yMax());
}
tileMap->generateTileSets();
tileMap->computeMinMaxLevel();
return tileMap;
}
示例4: TileMap
TileMap*
TileMap::create(const std::string& url,
const Profile* profile,
const std::string& format,
int tile_width,
int tile_height)
{
const GeoExtent& ex = profile->getExtent();
TileMap* tileMap = new TileMap();
tileMap->setProfileType(profile->getProfileType());
tileMap->setExtents(ex.xMin(), ex.yMin(), ex.xMax(), ex.yMax());
tileMap->setOrigin(ex.xMin(), ex.yMin());
tileMap->_filename = url;
tileMap->_srs = getHorizSRSString(profile->getSRS());
tileMap->_vsrs = profile->getSRS()->getVertInitString();
tileMap->_format.setWidth( tile_width );
tileMap->_format.setHeight( tile_height );
profile->getNumTiles( 0, tileMap->_numTilesWide, tileMap->_numTilesHigh );
// format can be a mime-type or an extension:
std::string::size_type p = format.find('/');
if ( p == std::string::npos )
{
tileMap->_format.setExtension(format);
tileMap->_format.setMimeType( Registry::instance()->getMimeTypeForExtension(format) );
}
else
{
tileMap->_format.setMimeType(format);
tileMap->_format.setExtension( Registry::instance()->getExtensionForMimeType(format) );
}
tileMap->generateTileSets();
tileMap->computeMinMaxLevel();
return tileMap;
}