Ignore:
Timestamp:
Feb 1, 2018, 11:27:28 AM (6 years ago)
Author:
djay
Message:

Add the capability to publish heatmap or any templated mapfile using the epecific msInclude and msLayer keys for an output. For MapServer? published output, define 4096 as the default maxsize and use pixel width or height for raster files. use the correct MapServer? imagemode depending on GDALGetRasterDataType (MS_IMAGEMODE_BYTE for GDT_Byte, MS_IMAGEMODE_INT16 for GDT_Int16 and MS_IMAGEMODE_FLOAT32 for GDT_Float32). Create a text file (.maps) listing every mapfiles created for a MapServer? published output (or inputs) using saveMapNames function. Fixes in ulinet, use uuid for naming temporary files. Add dialect input to the ogr2ogr service. Use the .maps file for removing a file from the DeleteData? service

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-services/cgal/voronoi.c

    r775 r862  
    2424
    2525#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
    26 #include <CGAL/Triangulation_euclidean_traits_xy_3.h>
     26//#include <CGAL/Triangulation_euclidean_traits_2.h>
    2727#include <CGAL/Delaunay_triangulation_2.h>
    28 #include <CGAL/Constrained_Delaunay_triangulation_2.h>
     28//#include <CGAL/Constrained_Delaunay_triangulation_2.h>
    2929#include <CGAL/Triangulation_conformer_2.h>
    3030#include <CGAL/Triangulation_face_base_2.h>
     
    3939
    4040typedef CGAL::Delaunay_triangulation_2<Kernel>  Triangulation;
     41typedef Triangulation::Face_iterator  Face_iterator;
    4142typedef Triangulation::Edge_iterator  Edge_iterator;
    4243typedef Triangulation::Vertex_circulator Vertex_circulator;
     
    4546
    4647  int Voronoi(maps*& conf,maps*& inputs,maps*& outputs){
    47 #ifdef DEBUG
     48    //#ifdef DEBUG
    4849    fprintf(stderr,"\nService internal print\nStarting\n");
    49 #endif
     50    //#endif
     51    //return SERVICE_FAILED;
    5052    maps* cursor=inputs;
    5153    OGRGeometryH geometry,res;
     
    5456    tmpm=getMapFromMaps(inputs,"InputPoints","value");
    5557
     58    fprintf(stderr," **** %s %d\n",__FILE__,__LINE__);
     59    fflush(stderr);
     60
    5661    OGRRegisterAll();
    5762
    58     std::vector<Point> points;
    59     if(int res=parseInput(conf,inputs,&points,"/vsimem/tmp")!=SERVICE_SUCCEEDED)
    60       return res;
     63    std::vector<Pointz> points;
     64    if(int res=parseInput(conf,inputs,&points,"/vsimem/tmp")!=SERVICE_SUCCEEDED){
     65      fprintf(stderr," **** %s %d\n",__FILE__,__LINE__);
     66      fflush(stderr);
     67      return SERVICE_FAILED;
     68    }
     69    fprintf(stderr," **** %s %d\n",__FILE__,__LINE__);
     70    fflush(stderr);
    6171   
    6272    Triangulation T;
    6373    T.insert(points.begin(), points.end());
    6474
    65     OGRRegisterAll();
     75    //OGRRegisterAll();
    6676    /* -------------------------------------------------------------------- */
    6777    /*      Try opening the output datasource as an existing, writable      */
     
    191201      CGAL::Object o = T.dual(eit);
    192202      if (const Kernel::Segment_2 *tmp=CGAL::object_cast<Kernel::Segment_2>(&o)) {
    193         const Point p1=tmp->source();
    194         const Point p2=tmp->target();
     203        const Pointz p1=tmp->source();
     204        const Pointz p2=tmp->target();
    195205#ifdef DEBUG
    196206        fprintf(stderr,"P1 %d %d | P2 %d %d\n",p1.x(),p1.y(),p2.x(),p2.y());
     
    210220      }
    211221      else if (const Kernel::Ray_2 *tmp=CGAL::object_cast<Kernel::Ray_2>(&o)) {
    212         const Point p1=tmp->source();
    213         const Point p2=tmp->point(2);
     222        const Pointz p1=tmp->source();
     223        const Pointz p2=tmp->point(2);
    214224        OGRFeatureH hFeature = OGR_F_Create( OGR_L_GetLayerDefn( poDstLayer ) );
    215225        OGRGeometryH currLine=OGR_G_CreateGeometry(wkbLineString);
     
    250260    fprintf(stderr,"\nService internal print\n===\n");
    251261#endif
    252     OGRCleanupAll();
     262    //OGRCleanupAll();
    253263    return SERVICE_SUCCEEDED;
    254264  }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png