fix geometry_to_wkb utility
This commit is contained in:
parent
5f073ee299
commit
642bdfa78c
2 changed files with 18 additions and 22 deletions
|
@ -1,12 +1,12 @@
|
|||
######################################################################
|
||||
|
||||
MAPNIK_INCLUDE_DIR = "/opt/mapnik/include" ;
|
||||
MAPNIK_INCLUDE_DIR = "/Users/artem/Projects/mapnik/include" ;
|
||||
MAPNIK_LIB_DIR = "/opt/mapnik/lib" ;
|
||||
BOOST_INCLUDE_DIR = "/opt/boost_1_48_0/include" ;
|
||||
|
||||
BOOST_INCLUDE_DIR = "/opt/boost/include" ;
|
||||
ICU_DIR = "/opt/icu" ;
|
||||
|
||||
lib mapnik : : <name>mapnik <search>$(MAPNIK_LIB_DIR) ;
|
||||
lib icu : : <name>icuuc <search>/usr/local/lib ;
|
||||
lib icu : : <name>icuuc <search>$(ICU_DIR)/lib ;
|
||||
|
||||
exe to_wkb :
|
||||
main.cpp
|
||||
|
@ -14,6 +14,6 @@ exe to_wkb :
|
|||
.//icu
|
||||
:
|
||||
<include>$(MAPNIK_INCLUDE_DIR)
|
||||
<include>$(BOOST_INCLUDE_DIR)
|
||||
<include>$(BOOST_INCLUDE_DIR)
|
||||
<include>$(ICU_DIR)/include
|
||||
;
|
||||
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <mapnik/geometry.hpp>
|
||||
#include <mapnik/geometry_impl.hpp>
|
||||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/params.hpp>
|
||||
#include <mapnik/datasource.hpp>
|
||||
#include <mapnik/datasource_cache.hpp>
|
||||
#include <mapnik/util/geometry_to_wkb.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
int main (int argc, char ** argv )
|
||||
{
|
||||
|
||||
|
@ -81,21 +81,17 @@ int main (int argc, char ** argv )
|
|||
while(f)
|
||||
{
|
||||
std::cerr << *f << std::endl;
|
||||
mapnik::geometry_container const& paths = f->paths();
|
||||
for (mapnik::geometry_type const& geom : paths)
|
||||
mapnik::new_geometry::geometry const& geom = f->get_geometry();
|
||||
// NDR
|
||||
{
|
||||
// NDR
|
||||
{
|
||||
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(geom,mapnik::util::wkbNDR);
|
||||
std::cerr << mapnik::util::to_hex(wkb->buffer(),wkb->size()) << std::endl;
|
||||
}
|
||||
// XDR
|
||||
{
|
||||
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(geom,mapnik::util::wkbXDR);
|
||||
std::cerr << mapnik::util::to_hex(wkb->buffer(),wkb->size()) << std::endl;
|
||||
}
|
||||
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(geom,mapnik::wkbNDR);
|
||||
std::cerr << mapnik::util::detail::to_hex(wkb->buffer(),wkb->size()) << std::endl;
|
||||
}
|
||||
// XDR
|
||||
{
|
||||
mapnik::util::wkb_buffer_ptr wkb = mapnik::util::to_wkb(geom,mapnik::wkbXDR);
|
||||
std::cerr << mapnik::util::detail::to_hex(wkb->buffer(),wkb->size()) << std::endl;
|
||||
}
|
||||
|
||||
f = fs->next();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue