Changeset 2475 for proto/gml2svg/lib


Ignore:
Timestamp:
Oct 17, 2012, 6:40:28 PM (7 years ago)
Author:
ksherdy
Message:

Updated to SOA representation.

Location:
proto/gml2svg/lib/C/gml2svg
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • proto/gml2svg/lib/C/gml2svg/util.cpp

    r1705 r2475  
    1818
    1919extern int errno;
    20 
    21 char * layers_2_string(const char * layers [], int length)
    22 {
    23         int total_length = 0;
    24         int i;
    25         for(i=0;i<length;i++)
    26         {
    27                 total_length += strlen(layers[i]);
    28         }
    29 
    30         char * layers_string = new char[total_length + length + 1];
    31 
    32         strcpy(layers_string,layers[0]);
    33 
    34         for(i=1;i<length;i++)
    35         {
    36                 strcat(layers_string,"\n");
    37                 strcat(layers_string,layers[i]);
    38         }
    39 
    40         strcat(layers_string,"\0");
    41 
    42         return layers_string;
    43 }
    4420
    4521char * create_timestamp_filename()
  • proto/gml2svg/lib/C/gml2svg/util.h

    r1705 r2475  
    99
    1010#include <stdio.h>
    11 /*
    12  * layers_2_string:
    13  * returns newline '\n' delimited layer string
    14  */
    15 extern char * layers_2_string(const char * layers [], int length);
    1611
    1712/*
  • proto/gml2svg/lib/C/gml2svg/vancouver_constants.cpp

    r1705 r2475  
    33// Maximum length estimate
    44const int FEATURE_LOCAL_NAMES_MAX_LENGTH_EST = 80;
    5 const int NUM_FEATURE_COLLECTIONS = 46;
     5const int FEATURE_LAYER_COUNT = 46;
    66
    77// file extensions
     
    3535const char * GML_COORDINATES_LNAME = "coordinates";
    3636const char * GML_COORDINATES_QNAME = "gml:coordinates";
     37
     38struct feature_layer feature_layers [] {
     39"RP4D","van:RP4D","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     40"Spur","van:Spur","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     41"University","van:University","extentOf","gml:extentOf","stroke:rgb(235,140,63);stroke-width:0.5;fill:none;",
     42"FerryRoute","van:FerryRoute","centerLineOf","gml:centerLineOf","stroke-width:2;stroke:rgb(217,41,37);fill:none;",
     43"FireStation","van:FireStation","extentOf","gml:extentOf","fill:rgb(255,0,0);fill-opacity:1.0;stroke:rgb(0,0,0);stroke-opacity:1.0;stroke-width:1;",
     44"RROUGH","van:RROUGH","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(175,57,132);fill:none;",
     45"SingleTrack","van:SingleTrack","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     46"CityHall","van:CityHall","extentOf","gml:extentOf","fill:rgb(246,242,213);stroke:rgb(0,0,0);stroke-opacity:1.0;stroke-width:1;",
     47"FerryTerminal","van:FerryTerminal","extentOf","gml:extentOf","fill:rgb(0,153,153);fill-opacity:1.0;stroke:rgb(211,161,141);stroke-width:0.5;",
     48"Church","van:Church","extentOf","gml:extentOf","fill:rgb(243,228,83);stroke:rgb(0,0,0);stroke-opacity:1.0;stroke-width:1;",
     49"RP3U","van:RP3U","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     50"RP6U","van:RP6U","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     51"LightRailTransit","van:LightRailTransit","centerLineOf","gml:centerLineOf","stroke-width:2;stroke:rgb(63,176,104);fill:none;",
     52"Footbridge","van:Footbridge","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(175,57,132);fill:none;",
     53"RetainingWall","van:RetainingWall","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(217,41,37);fill:none;",
     54"Tunnel","van:Tunnel","centerLineOf","gml:centerLineOf","stroke-width:4;stroke:rgb(69,34,118);fill:none;",
     55"RL1U","van:RL1U","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     56"Ocean","van:Ocean","extentOf","gml:extentOf","fill:rgb(79,166,255);fill-opacity:1.0;stroke:none;stroke-opacity:1.0;",
     57"Lake","van:Lake","extentOf","gml:extentOf","fill:rgb(0,102,204);fill-opacity:1.0;",
     58"Bridge","van:Bridge","centerLineOf","gml:centerLineOf","stroke-width:1;stroke:rgb(69,34,118);fill:none;",
     59"College","van:College","extentOf","gml:extentOf","fill:rgb(246,242,213);stroke:rgb(0,0,0);stroke-opacity:1.0;stroke-width:1;",
     60"Trestle","van:Trestle","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(175,57,132);fill:none;",
     61"Greenhouse","van:Greenhouse","extentOf","gml:extentOf","fill:rgb(66,174,64);stroke:rgb(0,0,0);stroke-opacity:1.0;stroke-width:1;",
     62"Hospital","van:Hospital","extentOf","gml:extentOf","fill:rgb(243,197,120);stroke:rgb(0,51,153);stroke-opacity:1.0;stroke-width:1;",
     63"CourtHouse","van:CourtHouse","extentOf","gml:extentOf","fill:rgb(246,242,213);stroke:rgb(0,0,0);stroke-opacity:1.0;stroke-width:1;",
     64"DoubleTrack","van:DoubleTrack","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(69,34,118);fill:none;",
     65"UnspecifiedBuilding","van:UnspecifiedBuilding","extentOf","gml:extentOf","fill:rgb(167,125,60);",
     66"RP2U","van:RP2U","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     67"TailingPond","van:TailingPond","extentOf","gml:extentOf","fill:rgb(41,30,116);stroke-width:1;",
     68"MultipleTrack","van:MultipleTrack","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(175,57,132);fill:none;",
     69"PostOffice","van:PostOffice","extentOf","gml:extentOf","fill:rgb(165,41,38);",
     70"CutEarthwork","van:CutEarthwork","centerLineOf","gml:centerLineOf","stroke-width:1;stroke:rgb(217,41,37);fill:none;",
     71"Reservoir","van:Reservoir","extentOf","gml:extentOf","fill:rgb(175,57,132);",
     72"TransmissionLine","van:TransmissionLine","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(149,161,159);fill:none;",
     73"Riverb","van:Riverb","extentOf","gml:extentOf","fill:rgb(204,255,255);fill-opacity:1.0;stroke:rgb(0,123,188);stroke-width:2;",
     74"Buildup","van:Buildup","extentOf","gml:extentOf","fill:rgb(224,195,180);",
     75"TransmissionTower","van:TransmissionTower","extentOf","gml:extentOf","fill:rgb(19,21,23);stroke:rgb(153,153,0);stroke-opacity:1.0;stroke-width:1;",
     76"PoliceStation","van:PoliceStation","extentOf","gml:extentOf","fill:rgb(41,30,116);",
     77"RP2U1W","van:RP2U1W","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     78"School","van:School","extentOf","gml:extentOf","fill:rgb(246,242,213);stroke:rgb(0,0,0);stroke-opacity:1.0;stroke-width:1;",
     79"AbandonedTrack","van:AbandonedTrack","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(105,117,118);fill:none;",
     80"Pipeline","van:Pipeline","centerLineOf","gml:centerLineOf","stroke-width:1;stroke:rgb(173,56,131);fill:none;",
     81"RP4U","van:RP4U","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
     82"Communications","van:Communications","extentOf","gml:extentOf","fill:rgb(217,41,37);stroke:rgb(19,21,23);stroke-opacity:1.0;stroke-width:1;",
     83"FillEmbankment","van:FillEmbankment","centerLineOf","gml:centerLineOf","stroke-width:1;stroke:rgb(217,41,37);fill:none;",
     84"RL2U","van:RL2U","centerLineOf","gml:centerLineOf","stroke-width:0.5;stroke:rgb(19,21,23);fill:none;"
     85};
     86
     87/*
     88// DEPRECATED - Feature attr array representation.
    3789
    3890// Feature local names
     
    94146                //45
    95147                "RL2U",
    96 //              "Airport",
    97 //              "Hotel"
     148                "Airport",
     149                "Hotel"
     150
    98151};
    99152
     
    154207                "van:FillEmbankment",
    155208                //45
    156                 "van:RL2U"
    157 //              "van:Airport",
    158 //              "van:Hotel"
     209                "van:RL2U",
     210                "van:Airport",
     211                "van:Hotel"
    159212};
    160213
     
    215268                //45
    216269                "centerLineOf",
    217 //              "position",
    218 //              "position"
     270                "position",
     271                "position"
    219272};
    220273
     
    276329                //45
    277330                "gml:centerLineOf",
    278 //              "gml:position",
    279 //              "gml:position"
     331                "gml:position",
     332                "gml:position"
    280333};
    281334
     
    336389                //45
    337390                "stroke-width:0.5;stroke:rgb(19,21,23);fill:none;",
    338                 //"",
    339                 //"",
    340 };
     391                "",
     392                "",
     393};
     394
     395*/
  • proto/gml2svg/lib/C/gml2svg/vancouver_constants.h

    r1705 r2475  
    1010// Maximum length estimate
    1111extern const int FEATURE_LOCAL_NAMES_MAX_LENGTH_EST;
    12 extern const int NUM_FEATURE_COLLECTIONS;
     12extern const int FEATURE_LAYER_COUNT;
    1313
    1414// Dot '.' file extensions
     
    4343extern const char * GML_COORDINATES_QNAME;
    4444
     45extern struct feature_layer {
     46        const char * lname;
     47        const char * qname;
     48        const char * lgeometry;
     49        const char * qgeometry;
     50        const char * style;
     51} feature_layers [];
     52
     53/*
     54// DEPRECATED - Feature attr array representation.
     55
    4556// Feature local names
    4657extern const char * FEATURE_LNAMES [];
     
    5667
    5768extern const char * FEATURE_STYLES [];
     69*/
     70
    5871#endif /*VANCOUVERCONSTANTS_H_*/
Note: See TracChangeset for help on using the changeset viewer.