├── .gitlab-ci.yml ├── LICENSE ├── README.md ├── geores_src ├── g_r_e_s_context_tools.rb ├── geores_debug │ └── gres_cgmldebugger.rb ├── geores_export │ ├── export_dlg.html │ ├── gres_citygml_exporter.rb │ └── gres_export_main.rb ├── geores_gui │ ├── cityobj_script.js │ ├── cityobjects_dlg.html │ ├── date │ │ └── format.rb │ ├── geores_resgui │ │ └── verlauf.png │ ├── geores_selection │ │ └── gres_selectable_city_object.rb │ ├── gresStyles.css │ ├── gres_app_observer.rb │ ├── gres_city_object_dialog.rb │ ├── gres_city_object_selection_observer.rb │ ├── gres_editdlg.rb │ ├── gres_progress.rb │ ├── parsedate.rb │ ├── rational.rb │ ├── time.rb │ └── verlauf.png ├── geores_import │ └── geores_rexml │ │ ├── attlistdecl.rb │ │ ├── attribute.rb │ │ ├── cdata.rb │ │ ├── child.rb │ │ ├── comment.rb │ │ ├── doctype.rb │ │ ├── document.rb │ │ ├── element.rb │ │ ├── encoding.rb │ │ ├── entity.rb │ │ ├── functions.rb │ │ ├── geores_dtd │ │ ├── attlistdecl.rb │ │ ├── dtd.rb │ │ ├── elementdecl.rb │ │ ├── entitydecl.rb │ │ └── notationdecl.rb │ │ ├── geores_encodings │ │ ├── CP-1252.rb │ │ ├── EUC-JP.rb │ │ ├── ICONV.rb │ │ ├── ISO-8859-1.rb │ │ ├── ISO-8859-15.rb │ │ ├── SHIFT-JIS.rb │ │ ├── SHIFT_JIS.rb │ │ ├── UNILE.rb │ │ ├── US-ASCII.rb │ │ ├── UTF-16.rb │ │ └── UTF-8.rb │ │ ├── geores_formatters │ │ ├── default.rb │ │ ├── pretty.rb │ │ └── transitive.rb │ │ ├── geores_light │ │ └── node.rb │ │ ├── geores_parsers │ │ ├── baseparser.rb │ │ ├── lightparser.rb │ │ ├── pullparser.rb │ │ ├── sax2parser.rb │ │ ├── streamparser.rb │ │ ├── treeparser.rb │ │ ├── ultralightparser.rb │ │ └── xpathparser.rb │ │ ├── geores_validation │ │ ├── relaxng.rb │ │ ├── validation.rb │ │ └── validationexception.rb │ │ ├── instruction.rb │ │ ├── namespace.rb │ │ ├── node.rb │ │ ├── output.rb │ │ ├── parent.rb │ │ ├── parseexception.rb │ │ ├── quickpath.rb │ │ ├── rexml.rb │ │ ├── sax2listener.rb │ │ ├── source.rb │ │ ├── streamlistener.rb │ │ ├── syncenumerator.rb │ │ ├── text.rb │ │ ├── xmldecl.rb │ │ ├── xmltokens.rb │ │ ├── xpath.rb │ │ └── xpath_parser.rb ├── geores_parser │ ├── citygml_import_main.rb │ ├── citygml_loader.rb │ ├── citygmlparser.rb │ ├── cityobjectparser.rb │ ├── cityobjectparserfactory.rb │ ├── geores_featureparser │ │ ├── gres_boundary_parser.rb │ │ ├── gres_bridge_parser.rb │ │ ├── gres_building_parser.rb │ │ ├── gres_city_object_group_parser.rb │ │ ├── gres_cityfurniture_parser.rb │ │ ├── gres_generic_city_object_parser.rb │ │ ├── gres_installation_parser.rb │ │ ├── gres_land_use_parser.rb │ │ ├── gres_opening_parser.rb │ │ ├── gres_plant_cover_parser.rb │ │ ├── gres_relief_feature_parser.rb │ │ ├── gres_site_parser.rb │ │ ├── gres_sol_veg_parser.rb │ │ ├── gres_traffic_area_parser.rb │ │ ├── gres_transportation_parser.rb │ │ ├── gres_tunnel_parser.rb │ │ ├── gres_water_body_parser.rb │ │ └── gres_water_boundary_parser.rb │ ├── geores_geo │ │ ├── grs_geoparser.rb │ │ ├── grs_implicit_geometry_parser.rb │ │ ├── grs_multi_geometry_parser.rb │ │ ├── grs_solid_geometry_parser.rb │ │ └── grs_triangulated_surface_parser.rb │ ├── geores_specific │ │ ├── gres_address_parser.rb │ │ ├── gres_appearance_parser.rb │ │ └── gres_external_reference_parser.rb │ └── layer_creator.rb ├── geores_schema │ ├── abstract_all.rb │ ├── geores_attributes │ │ ├── gres_address.rb │ │ ├── gres_external_reference.rb │ │ ├── gres_generic_city_object_attribute.rb │ │ └── simple_city_object_attribute.rb │ ├── geores_feature │ │ ├── gres_boundary.rb │ │ ├── gres_bridge.rb │ │ ├── gres_building.rb │ │ ├── gres_cityfurniture.rb │ │ ├── gres_cityobject.rb │ │ ├── gres_generic_city_object.rb │ │ ├── gres_installation.rb │ │ ├── gres_land_use.rb │ │ ├── gres_opening.rb │ │ ├── gres_plant_cover.rb │ │ ├── gres_raster_relief.rb │ │ ├── gres_relief_feature.rb │ │ ├── gres_site.rb │ │ ├── gres_solitary_vegetation_object.rb │ │ ├── gres_t_i_n_relief.rb │ │ ├── gres_traffic_area.rb │ │ ├── gres_transportation.rb │ │ ├── gres_tunnel.rb │ │ ├── gres_water_body.rb │ │ └── gres_water_boundary.rb │ ├── geores_geo │ │ ├── gres_geometry_collection.rb │ │ ├── gres_implicitgeometry.rb │ │ ├── gres_linear_ring.rb │ │ ├── gres_multisurfacegeometry.rb │ │ ├── gres_point.rb │ │ ├── gres_solidgeometry.rb │ │ └── gres_surface.rb │ └── geores_material │ │ ├── gres_abstract_appearance.rb │ │ ├── gres_georeferenced_texture.rb │ │ ├── gres_parameterized_texture.rb │ │ ├── gres_target.rb │ │ ├── gres_texcoordlist.rb │ │ └── gres_x3d_material.rb └── geores_toolbar │ ├── LayerGenerator.rb │ ├── city_g_m_l_layer_maker.rb │ ├── geores_Images │ ├── aux_traffic_area_16.png │ ├── aux_traffic_area_24.png │ ├── bridge_16.png │ ├── bridge_24.png │ ├── bridge_closure_16.png │ ├── bridge_closure_24.png │ ├── bridge_construction_16.png │ ├── bridge_construction_24.png │ ├── bridge_door_16.png │ ├── bridge_door_24.png │ ├── bridge_ground_16.png │ ├── bridge_ground_24.png │ ├── bridge_installation_16.png │ ├── bridge_installation_24.png │ ├── bridge_outerceiling_16.png │ ├── bridge_outerceiling_24.png │ ├── bridge_outerfloor_16.png │ ├── bridge_outerfloor_24.png │ ├── bridge_part_16.png │ ├── bridge_part_24.png │ ├── bridge_roof_16.png │ ├── bridge_roof_24.png │ ├── bridge_roof_no_solid_16.png │ ├── bridge_roof_no_solid_24.png │ ├── bridge_wall_16.png │ ├── bridge_wall_24.png │ ├── bridge_window_16.png │ ├── bridge_window_24.png │ ├── building16.png │ ├── building24.png │ ├── building_bpart16.png │ ├── building_bpart24.png │ ├── building_buiInst16.png │ ├── building_buiInst24.png │ ├── building_closure16.png │ ├── building_closure24.png │ ├── building_door16.png │ ├── building_door24.png │ ├── building_ground16.png │ ├── building_ground24.png │ ├── building_outerceiling16.png │ ├── building_outerceiling24.png │ ├── building_outerfloor16.png │ ├── building_outerfloor24.png │ ├── building_roof16.png │ ├── building_roof24.png │ ├── building_roofNoSolid16.png │ ├── building_roofNoSolid24.png │ ├── building_roofWindow16.png │ ├── building_roofWindow24.png │ ├── building_wall16.png │ ├── building_wall24.png │ ├── building_wallWindow16.png │ ├── building_wallWindow24.png │ ├── building_window16.png │ ├── building_window24.png │ ├── cityfurniture_16.png │ ├── cityfurniture_24.png │ ├── cityfurniture_impl_16.png │ ├── cityfurniture_impl_24.png │ ├── generic16.png │ ├── generic24.png │ ├── generic_impl16.png │ ├── generic_impl24.png │ ├── landuse_16.png │ ├── landuse_24.png │ ├── plantcover16.png │ ├── plantcover24.png │ ├── railway_16.png │ ├── railway_24.png │ ├── road_16.png │ ├── road_24.png │ ├── solitaryVeg_impl_16.png │ ├── solitaryVeg_impl_24.png │ ├── solitayrVeg16.png │ ├── solitayrVeg24.png │ ├── square_16.png │ ├── square_24.png │ ├── tin16.png │ ├── tin24.png │ ├── track_16.png │ ├── track_24.png │ ├── trafficarea_16.png │ ├── trafficarea_24.png │ ├── tunnel_16.png │ ├── tunnel_24.png │ ├── tunnel_closure_16.png │ ├── tunnel_closure_24.png │ ├── tunnel_door_16.png │ ├── tunnel_door_24.png │ ├── tunnel_ground_16.png │ ├── tunnel_ground_24.png │ ├── tunnel_installation_16.png │ ├── tunnel_installation_24.png │ ├── tunnel_outerceiling_16.png │ ├── tunnel_outerceiling_24.png │ ├── tunnel_outerfloor_16.png │ ├── tunnel_outerfloor_24.png │ ├── tunnel_part_16.png │ ├── tunnel_part_24.png │ ├── tunnel_roof_16.png │ ├── tunnel_roof_24.png │ ├── tunnel_wall_16.png │ ├── tunnel_wall_24.png │ ├── tunnel_window_16.png │ ├── tunnel_window_24.png │ ├── water_ground_surface_16.png │ ├── water_ground_surface_24.png │ ├── water_surface_16.png │ ├── water_surface_24.png │ ├── waterbody_16.png │ └── waterbody_24.png │ ├── geores_layergensrc │ ├── name_tester.rb │ └── number_generator.rb │ ├── gres_boundary_layer_maker.rb │ ├── gres_installation_layer_maker.rb │ ├── gres_manual_selector.rb │ ├── gres_opening_layer_maker.rb │ └── gres_traffic_area_layer_maker.rb └── geores_tools_extension.rb /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | before_script: 2 | # install extra build packages 3 | - apk add --no-cache zip 4 | 5 | ziprbz: 6 | image: 7 | name: alpine:3.20.2 8 | script: 9 | - zip -r geores.rbz geores_tools_extension.rb geores_src 10 | artifacts: 11 | paths: 12 | - geores.rbz 13 | expire_in: 1 week 14 | tags: 15 | - e2e 16 | 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Geoplex GIS GmbH 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GEORES SketchUp CityGML Plugin 2 | 3 | ## About 4 | 5 | The GEORES SketchUp CityGML Plugin allows to import and export CityGML files. It also provides 6 | functionalities to annotate meshes and faces with the according CityGML classes and attributes. 7 | 8 | The code has originally been developed by Wolfgang Sach and distributed by his company GEORES. In 9 | 2018, Wolfgang stopped development on the project and released the code as open source. Since 2019, 10 | the GEORES Plugin is free to use and released under the MIT license. 11 | 12 | Pull requests welcome! 13 | 14 | ## Supported SketchUp Versions 15 | 16 | * SketchUp 2017 17 | * SketchUp 2018 18 | * SketchUp 2019 19 | * SketchUp 2024 20 | 21 | ## Installation 22 | 23 | Download the `geores.rbz` from [here](https://github.com/GeoplexGIS/geores/releases) and use 24 | SketchUp Extension Manager to install. 25 | -------------------------------------------------------------------------------- /geores_src/geores_debug/gres_cgmldebugger.rb: -------------------------------------------------------------------------------- 1 | # Hilfsdebugger fuer die Ausgabe von Strings in eine Textdatei 2 | # Für die Benutzung die Kommentare in den Methoden entfernen und einen passenden Dateipfad angeben. 3 | 4 | class GRES_CGMLDebugger 5 | def initialize 6 | 7 | end 8 | 9 | def self.init() 10 | #@@filestream = File.open("D:/debugSketchup.txt", "w") 11 | end 12 | 13 | def self.writedebugstring(str) 14 | #@@filestream << str 15 | end 16 | 17 | def self.close() 18 | # @@filestream.close() 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /geores_src/geores_gui/cityobjects_dlg.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 |

CityGML Objekte

39 | 44 | 48 |
49 |
50 |

Attribute

51 | 56 |
57 |
58 |

Attributwerte

59 | 60 |
61 |
62 | 63 | 64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /geores_src/geores_gui/geores_resgui/verlauf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_gui/geores_resgui/verlauf.png -------------------------------------------------------------------------------- /geores_src/geores_gui/geores_selection/gres_selectable_city_object.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | class GRES_SelectableCityObject 5 | 6 | def initialize name 7 | @childs = Hash.new() 8 | @name = name 9 | @lod1Solid = false 10 | @lod2Solid = false 11 | @lod3Solid = false 12 | @lod4Solid = false 13 | 14 | end 15 | 16 | attr_reader :childs, :name, :lod1Solid, :lod2Solid, :lod3Solid, :lod4Solid 17 | 18 | def print_out 19 | uotput = @name 20 | @childs.each_key{ |key| 21 | o = @childs[key] 22 | uotput = uotput + " " + o.print_out 23 | } 24 | return uotput + "\n" 25 | end 26 | 27 | def setlod1Solid boolscher_wert 28 | @lod1Solid = boolscher_wert 29 | end 30 | def setlod2Solid boolscher_wert 31 | @lod2Solid = boolscher_wert 32 | end 33 | def setlod3Solid boolscher_wert 34 | @lod3Solid = boolscher_wert 35 | end 36 | def setlod4Solid boolscher_wert 37 | @lod4Solid = boolscher_wert 38 | end 39 | 40 | end 41 | -------------------------------------------------------------------------------- /geores_src/geores_gui/gres_app_observer.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'sketchup.rb' 4 | Sketchup::require 'geores_src/geores_gui/gres_city_object_dialog.rb' 5 | Sketchup::require 'geores_src/geores_parser/layer_creator.rb' 6 | 7 | class GRES_AppObserver < Sketchup::AppObserver 8 | 9 | def initialize gui 10 | super() 11 | @gui = gui 12 | end 13 | 14 | 15 | def onNewModel(model) 16 | 17 | model.selection.add_observer(GRES_CityObjectDialog.getobserver) 18 | @gui.clear() 19 | lm = LayerCreator.new() 20 | end 21 | 22 | def onOpenModel(model) 23 | model.selection.add_observer(GRES_CityObjectDialog.getobserver) 24 | @gui.clear() 25 | lm = LayerCreator.new() 26 | end 27 | 28 | end 29 | -------------------------------------------------------------------------------- /geores_src/geores_gui/gres_editdlg.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'sketchup.rb' 4 | Sketchup::require 'geores_src/geores_gui/gres_city_object_dialog.rb' 5 | 6 | if(not $tool_command_loaded_edit) 7 | 8 | cmd_edit = UI::Command.new("GEORES CityGML Objekt Dialog") { 9 | 10 | 11 | gui = GRES_CityObjectDialog.new("CityGML Objekt Dialog (GEORES)", true, "EDITDIALOG", 430, 550, 15, 15, true) 12 | #htmldialog = CityGMLWriterDialog.new() 13 | #gui.set_html(htmldialog.gethtmldialog()) 14 | gui.set_file(File.dirname(__FILE__) + "/cityobjects_dlg.html"); 15 | gui.show() 16 | 17 | gui.add_action_callback("showlod") {| dialog , params | 18 | 19 | ps = params.split('&') 20 | lod = "lod" + ps[0].to_s 21 | checked = ps[1].to_s 22 | dialog.showlod(lod,checked) 23 | 24 | } 25 | 26 | 27 | gui.add_action_callback("refresh") {| dialog, params | 28 | dialog.refresh() 29 | } 30 | 31 | gui.add_action_callback("get_attributes") {| dialog, params | 32 | 33 | dialog.get_attributes(params) 34 | } 35 | 36 | gui.add_action_callback("get_attribute_content") {| dialog, params | 37 | ps = params.split('&') 38 | dictname = ps[0].to_s 39 | attribute= ps[1].to_s 40 | dialog.get_attribute_content(dictname, attribute) 41 | } 42 | 43 | gui.add_action_callback("save_attribute_content") {| dialog, params | 44 | ps = params.split('&') 45 | dictname = ps[0].to_s 46 | attribute= ps[1].to_s 47 | value = ps[2].to_s 48 | dialog.save_attribute_content(dictname, attribute, value) 49 | } 50 | 51 | 52 | gui.add_action_callback("handleobserver"){| dialog, params | 53 | dialog.handleobserver(params) 54 | } 55 | gui.add_action_callback("delete"){| dialog, params | 56 | ps = params.split('&') 57 | objectToDelete = ps[0].to_s 58 | mainObject = ps[1].to_s 59 | dialog.delete(objectToDelete, mainObject) 60 | } 61 | 62 | gui.set_on_close() { 63 | gui.clear 64 | #gui.makeOldVisual 65 | } 66 | } 67 | 68 | cmd_edit.status_bar_text = "GEORES CityGML Objekt Dialog" 69 | cmd_edit.menu_text = "GEORES CityGML Objekt Dialog" 70 | #UI.menu("Tools").add_separator 71 | $plugmenu = UI.menu("Tools") 72 | $plugmenu.add_item(cmd_edit) 73 | $tool_command_loaded_edit = true 74 | end -------------------------------------------------------------------------------- /geores_src/geores_gui/gres_progress.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_gui/time.rb' 2 | 3 | class GRES_Progress 4 | 5 | @@err_total_notnumeric = "ProgressBar: Total must be a positive integer." 6 | @@err_count_notnumeric = "ProgressBar: Iteration Count must be numeric" 7 | @@end_time = "Expected End Time:" 8 | @@progresschar = ">" 9 | @@initial_block = "-" * 50 # Default progress bar line sequence. 10 | @iteration = 0 11 | 12 | def initialize(total,phase=nil) 13 | if (!total.integer? or total < 0) 14 | raise(ArgumentError,@@err_total_notnumeric) 15 | return 16 | end 17 | @id = UI.start_timer(1, false) { update(@iteration) } 18 | @total = total.to_i 19 | @phase = phase 20 | @firsttime = true 21 | end 22 | 23 | def setphase (ph) 24 | @phase = ph 25 | end 26 | 27 | def update(iteration) 28 | @iteration = iteration 29 | if(@iteration == nil) 30 | return 31 | end 32 | if !iteration.integer? 33 | raise(ArgumentError,@@err_count_notnumeric) 34 | return 35 | end 36 | @iteration = [@iteration.abs,@total].min # make sure we don't exceed the total count or have a value < 0 37 | pct = [1,(@iteration*100)/@total].max # Calculate percentage complete. 38 | # round up to 1% if anything less than 1%. 39 | end_time = "?" 40 | if (@firsttime == true) 41 | # Get the current time of day. 42 | # set up an elapsed timer so we can calculate expected end time. 43 | @time1 = Time.now # Get current time of day. 44 | @firsttime = false # turn off switch 45 | else 46 | # divide the elapsed time by the pct complete, then multiple that by 100, then add that to the 47 | # start time, and that is the expected end time. 48 | end_time = Time.at(((((Time.now-@time1).to_f)/pct)*100 + @time1.to_f).to_i).strftime("%c") 49 | end 50 | pct_pos = [pct/2,1].max 51 | current_block = @@initial_block[0,pct_pos-1] << @@progresschar << @@initial_block[pct_pos,@@initial_block.length] 52 | Sketchup.set_status_text(current_block + " " + pct.to_s + "%. #{@@end_time} " + end_time + "<< #{@phase}") 53 | end 54 | 55 | def end_timer 56 | if(@id) 57 | UI.stop_timer @id 58 | end 59 | end 60 | end 61 | 62 | 63 | -------------------------------------------------------------------------------- /geores_src/geores_gui/parsedate.rb: -------------------------------------------------------------------------------- 1 | # 2 | # = parsedate.rb: Parses dates 3 | # 4 | # Author:: Tadayoshi Funaba 5 | # Documentation:: Konrad Meyer 6 | # 7 | # ParseDate munches on a date and turns it into an array of values. 8 | # 9 | 10 | # 11 | # ParseDate converts a date into an array of values. 12 | # For example: 13 | # 14 | # require 'parsedate' 15 | # 16 | # ParseDate.parsedate "Tuesday, July 6th, 2007, 18:35:20 UTC" 17 | # # => [2007, 7, 6, 18, 35, 20, "UTC", 2] 18 | # 19 | # The order is of the form [year, month, day of month, hour, minute, second, 20 | # timezone, day of the week]. 21 | 22 | Sketchup::require 'geores_src/geores_gui/date/format.rb' 23 | 24 | module ParseDate 25 | # 26 | # Parse a string representation of a date into values. 27 | # For example: 28 | # 29 | # require 'parsedate' 30 | # 31 | # ParseDate.parsedate "Tuesday, July 5th, 2007, 18:35:20 UTC" 32 | # # => [2007, 7, 5, 18, 35, 20, "UTC", 2] 33 | # 34 | # The order is of the form [year, month, day of month, hour, minute, 35 | # second, timezone, day of week]. 36 | # 37 | # ParseDate.parsedate can also take a second argument, +comp+, which 38 | # is a boolean telling the method to compensate for dates with years 39 | # expressed as two digits. Example: 40 | # 41 | # require 'parsedate' 42 | # 43 | # ParseDate.parsedate "Mon Dec 25 00 06:53:24 UTC", true 44 | # # => [2000, 12, 25, 6, 53, 24, "UTC", 1] 45 | # 46 | def parsedate(str, comp=false) 47 | Date._parse(str, comp). 48 | values_at(:year, :mon, :mday, :hour, :min, :sec, :zone, :wday) 49 | end 50 | 51 | module_function :parsedate 52 | 53 | end 54 | -------------------------------------------------------------------------------- /geores_src/geores_gui/verlauf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_gui/verlauf.png -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/attlistdecl.rb: -------------------------------------------------------------------------------- 1 | #vim:ts=2 sw=2 noexpandtab: 2 | Sketchup::require 'geores_src/geores_import/geores_rexml/child.rb' 3 | Sketchup::require 'geores_src/geores_import/geores_rexml/source.rb' 4 | 5 | module REXML 6 | # This class needs: 7 | # * Documentation 8 | # * Work! Not all types of attlists are intelligently parsed, so we just 9 | # spew back out what we get in. This works, but it would be better if 10 | # we formatted the output ourselves. 11 | # 12 | # AttlistDecls provide *just* enough support to allow namespace 13 | # declarations. If you need some sort of generalized support, or have an 14 | # interesting idea about how to map the hideous, terrible design of DTD 15 | # AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate 16 | # for anything to make DTDs more palateable. 17 | class AttlistDecl < Child 18 | include Enumerable 19 | 20 | # What is this? Got me. 21 | attr_reader :element_name 22 | 23 | # Create an AttlistDecl, pulling the information from a Source. Notice 24 | # that this isn't very convenient; to create an AttlistDecl, you basically 25 | # have to format it yourself, and then have the initializer parse it. 26 | # Sorry, but for the forseeable future, DTD support in REXML is pretty 27 | # weak on convenience. Have I mentioned how much I hate DTDs? 28 | def initialize(source) 29 | super() 30 | if (source.kind_of? Array) 31 | @element_name, @pairs, @contents = *source 32 | end 33 | end 34 | 35 | # Access the attlist attribute/value pairs. 36 | # value = attlist_decl[ attribute_name ] 37 | def [](key) 38 | @pairs[key] 39 | end 40 | 41 | # Whether an attlist declaration includes the given attribute definition 42 | # if attlist_decl.include? "xmlns:foobar" 43 | def include?(key) 44 | @pairs.keys.include? key 45 | end 46 | 47 | # Itterate over the key/value pairs: 48 | # attlist_decl.each { |attribute_name, attribute_value| ... } 49 | def each(&block) 50 | @pairs.each(&block) 51 | end 52 | 53 | # Write out exactly what we got in. 54 | def write out, indent=-1 55 | out << @contents 56 | end 57 | 58 | def node_type 59 | :attlistdecl 60 | end 61 | end 62 | end 63 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/cdata.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/text.rb" 2 | 3 | module REXML 4 | class CData < Text 5 | START = '' 7 | ILLEGAL = /(\]\]>)/ 8 | 9 | # Constructor. CData is data between 10 | # 11 | # _Examples_ 12 | # CData.new( source ) 13 | # CData.new( "Here is some CDATA" ) 14 | # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) 15 | def initialize( first, whitespace=true, parent=nil ) 16 | super( first, whitespace, parent, true, true, ILLEGAL ) 17 | end 18 | 19 | # Make a copy of this object 20 | # 21 | # _Examples_ 22 | # c = CData.new( "Some text" ) 23 | # d = c.clone 24 | # d.to_s # -> "Some text" 25 | def clone 26 | CData.new self 27 | end 28 | 29 | # Returns the content of this CData object 30 | # 31 | # _Examples_ 32 | # c = CData.new( "Some text" ) 33 | # c.to_s # -> "Some text" 34 | def to_s 35 | @string 36 | end 37 | 38 | def value 39 | @string 40 | end 41 | 42 | # == DEPRECATED 43 | # See the rexml/formatters package 44 | # 45 | # Generates XML output of this object 46 | # 47 | # output:: 48 | # Where to write the string. Defaults to $stdout 49 | # indent:: 50 | # The amount to indent this node by 51 | # transitive:: 52 | # Ignored 53 | # ie_hack:: 54 | # Ignored 55 | # 56 | # _Examples_ 57 | # c = CData.new( " Some text " ) 58 | # c.write( $stdout ) #-> 59 | def write( output=$stdout, indent=-1, transitive=false, ie_hack=false ) 60 | Kernel.warn( "#{self.class.name}.write is deprecated" ) 61 | indent( output, indent ) 62 | output << START 63 | output << @string 64 | output << STOP 65 | end 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/child.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/node.rb" 2 | 3 | module REXML 4 | ## 5 | # A Child object is something contained by a parent, and this class 6 | # contains methods to support that. Most user code will not use this 7 | # class directly. 8 | class Child 9 | include Node 10 | attr_reader :parent # The Parent of this object 11 | 12 | # Constructor. Any inheritors of this class should call super to make 13 | # sure this method is called. 14 | # parent:: 15 | # if supplied, the parent of this child will be set to the 16 | # supplied value, and self will be added to the parent 17 | def initialize( parent = nil ) 18 | @parent = nil 19 | # Declare @parent, but don't define it. The next line sets the 20 | # parent. 21 | parent.add( self ) if parent 22 | end 23 | 24 | # Replaces this object with another object. Basically, calls 25 | # Parent.replace_child 26 | # 27 | # Returns:: self 28 | def replace_with( child ) 29 | @parent.replace_child( self, child ) 30 | self 31 | end 32 | 33 | # Removes this child from the parent. 34 | # 35 | # Returns:: self 36 | def remove 37 | unless @parent.nil? 38 | @parent.delete self 39 | end 40 | self 41 | end 42 | 43 | # Sets the parent of this child to the supplied argument. 44 | # 45 | # other:: 46 | # Must be a Parent object. If this object is the same object as the 47 | # existing parent of this child, no action is taken. Otherwise, this 48 | # child is removed from the current parent (if one exists), and is added 49 | # to the new parent. 50 | # Returns:: The parent added 51 | def parent=( other ) 52 | return @parent if @parent == other 53 | @parent.delete self if defined? @parent and @parent 54 | @parent = other 55 | end 56 | 57 | alias :next_sibling :next_sibling_node 58 | alias :previous_sibling :previous_sibling_node 59 | 60 | # Sets the next sibling of this child. This can be used to insert a child 61 | # after some other child. 62 | # a = Element.new("a") 63 | # b = a.add_element("b") 64 | # c = Element.new("c") 65 | # b.next_sibling = c 66 | # # => 67 | def next_sibling=( other ) 68 | parent.insert_after self, other 69 | end 70 | 71 | # Sets the previous sibling of this child. This can be used to insert a 72 | # child before some other child. 73 | # a = Element.new("a") 74 | # b = a.add_element("b") 75 | # c = Element.new("c") 76 | # b.previous_sibling = c 77 | # # => 78 | def previous_sibling=(other) 79 | parent.insert_before self, other 80 | end 81 | 82 | # Returns:: the document this child belongs to, or nil if this child 83 | # belongs to no document 84 | def document 85 | return parent.document unless parent.nil? 86 | nil 87 | end 88 | 89 | # This doesn't yet handle encodings 90 | def bytes 91 | encoding = document.encoding 92 | 93 | to_s 94 | end 95 | end 96 | end 97 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/comment.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/child.rb" 2 | 3 | module REXML 4 | ## 5 | # Represents an XML comment; that is, text between \ 6 | class Comment < Child 7 | include Comparable 8 | START = "" 10 | 11 | # The content text 12 | 13 | attr_accessor :string 14 | 15 | ## 16 | # Constructor. The first argument can be one of three types: 17 | # @param first If String, the contents of this comment are set to the 18 | # argument. If Comment, the argument is duplicated. If 19 | # Source, the argument is scanned for a comment. 20 | # @param second If the first argument is a Source, this argument 21 | # should be nil, not supplied, or a Parent to be set as the parent 22 | # of this object 23 | def initialize( first, second = nil ) 24 | #puts "IN COMMENT CONSTRUCTOR; SECOND IS #{second.type}" 25 | super(second) 26 | if first.kind_of? String 27 | @string = first 28 | elsif first.kind_of? Comment 29 | @string = first.string 30 | end 31 | end 32 | 33 | def clone 34 | Comment.new self 35 | end 36 | 37 | # == DEPRECATED 38 | # See REXML::Formatters 39 | # 40 | # output:: 41 | # Where to write the string 42 | # indent:: 43 | # An integer. If -1, no indenting will be used; otherwise, the 44 | # indentation will be this number of spaces, and children will be 45 | # indented an additional amount. 46 | # transitive:: 47 | # Ignored by this class. The contents of comments are never modified. 48 | # ie_hack:: 49 | # Needed for conformity to the child API, but not used by this class. 50 | def write( output, indent=-1, transitive=false, ie_hack=false ) 51 | Kernel.warn("Comment.write is deprecated. See REXML::Formatters") 52 | indent( output, indent ) 53 | output << START 54 | output << @string 55 | output << STOP 56 | end 57 | 58 | alias :to_s :string 59 | 60 | ## 61 | # Compares this Comment to another; the contents of the comment are used 62 | # in the comparison. 63 | def <=>(other) 64 | other.to_s <=> @string 65 | end 66 | 67 | ## 68 | # Compares this Comment to another; the contents of the comment are used 69 | # in the comparison. 70 | def ==( other ) 71 | other.kind_of? Comment and 72 | (other <=> self) == 0 73 | end 74 | 75 | def node_type 76 | :comment 77 | end 78 | end 79 | end 80 | #vim:ts=2 sw=2 noexpandtab: 81 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/encoding.rb: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby; ruby-indent-level: 2; indent-tabs-mode: t; tab-width: 2 -*- vim: sw=2 ts=2 2 | module REXML 3 | module Encoding 4 | @encoding_methods = {} 5 | def self.register(enc, &block) 6 | @encoding_methods[enc] = block 7 | end 8 | def self.apply(obj, enc) 9 | @encoding_methods[enc][obj] 10 | end 11 | def self.encoding_method(enc) 12 | @encoding_methods[enc] 13 | end 14 | 15 | # Native, default format is UTF-8, so it is declared here rather than in 16 | # an encodings/ definition. 17 | UTF_8 = 'UTF-8' 18 | UTF_16 = 'UTF-16' 19 | UNILE = 'UNILE' 20 | 21 | # ID ---> Encoding name 22 | attr_reader :encoding 23 | def encoding=( enc ) 24 | old_verbosity = $VERBOSE 25 | begin 26 | $VERBOSE = false 27 | enc = enc.nil? ? nil : enc.upcase 28 | return false if defined? @encoding and enc == @encoding 29 | if enc and enc != UTF_8 and enc != "WINDOWS-1252" 30 | @encoding = enc 31 | raise ArgumentError, "Bad encoding name #@encoding" unless @encoding =~ /^[\w-]+$/ 32 | if RUBY_VERSION < '3.0' 33 | @encoding.untaint 34 | end 35 | begin 36 | Sketchup::require 'geores_src/geores_import/geores_rexml/geores_encodings/ICONV.rb' 37 | Encoding.apply(self, "ICONV") 38 | rescue LoadError, Exception 39 | begin 40 | enc_file = File.join( "rexml", "encodings", "#@encoding.rb" ) 41 | require enc_file 42 | Encoding.apply(self, @encoding) 43 | rescue LoadError => err 44 | #puts err.message 45 | raise ArgumentError, "No decoder found for encoding #@encoding. Please install iconv." 46 | end 47 | end 48 | else 49 | @encoding = UTF_8 50 | Sketchup::require 'geores_src/geores_import/geores_rexml/geores_encodings/UTF-8.rb' 51 | Encoding.apply(self, @encoding) 52 | end 53 | ensure 54 | $VERBOSE = old_verbosity 55 | end 56 | true 57 | end 58 | 59 | def check_encoding str 60 | # We have to recognize UTF-16, LSB UTF-16, and UTF-8 61 | return UTF_16 if /\A\xfe\xff/n =~ str 62 | return UNILE if /\A\xff\xfe/n =~ str 63 | str =~ /^\s*<\?xml\s+version\s*=\s*(['"]).*?\1\s+encoding\s*=\s*(["'])(.*?)\2/um 64 | return $3.upcase if $3 65 | return UTF_8 66 | end 67 | end 68 | end 69 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_dtd/attlistdecl.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/child.rb" 2 | module REXML 3 | module DTD 4 | class AttlistDecl < Child 5 | START = ")/um 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_dtd/dtd.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/geores_dtd/elementdecl.rb" 2 | Sketchup::require "geores_src/geores_import/geores_rexml/geores_dtd/entitydecl.rb" 3 | Sketchup::require "geores_src/geores_import/geores_rexml/comment.rb" 4 | Sketchup::require "geores_src/geores_import/geores_rexml/geores_dtd/notationdecl.rb" 5 | Sketchup::require "geores_src/geores_import/geores_rexml/geores_dtd/attlistdecl.rb" 6 | Sketchup::require "geores_src/geores_import/geores_rexml/parent.rb" 7 | 8 | module REXML 9 | module DTD 10 | class Parser 11 | def Parser.parse( input ) 12 | case input 13 | when String 14 | parse_helper input 15 | when File 16 | parse_helper input.read 17 | end 18 | end 19 | 20 | # Takes a String and parses it out 21 | def Parser.parse_helper( input ) 22 | contents = Parent.new 23 | while input.size > 0 24 | case input 25 | when ElementDecl.PATTERN_RE 26 | match = $& 27 | source = $' 28 | contents << ElementDecl.new( match ) 29 | when AttlistDecl.PATTERN_RE 30 | matchdata = $~ 31 | source = $' 32 | contents << AttlistDecl.new( matchdata ) 33 | when EntityDecl.PATTERN_RE 34 | matchdata = $~ 35 | source = $' 36 | contents << EntityDecl.new( matchdata ) 37 | when Comment.PATTERN_RE 38 | matchdata = $~ 39 | source = $' 40 | contents << Comment.new( matchdata ) 41 | when NotationDecl.PATTERN_RE 42 | matchdata = $~ 43 | source = $' 44 | contents << NotationDecl.new( matchdata ) 45 | end 46 | end 47 | contents 48 | end 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_dtd/elementdecl.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/child.rb" 2 | module REXML 3 | module DTD 4 | class ElementDecl < Child 5 | START = "/um 8 | PATTERN_RE = /^\s*#{START}\s+((?:[:\w_][-\.\w_]*:)?[-!\*\.\w_]*)(.*?)>/ 9 | #\s*((((["']).*?\5)|[^\/'">]*)*?)(\/)?>/um, true) 10 | 11 | def initialize match 12 | @name = match[1] 13 | @rest = match[2] 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_dtd/entitydecl.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/child.rb" 2 | module REXML 3 | module DTD 4 | class EntityDecl < Child 5 | START = "/um 8 | SYSTEM = /^\s*#{START}\s+(?:%\s+)?(\w+)\s+SYSTEM\s+((["']).*?\3)(?:\s+NDATA\s+\w+)?\s*>/um 9 | PLAIN = /^\s*#{START}\s+(\w+)\s+((["']).*?\3)\s*>/um 10 | PERCENT = /^\s*#{START}\s+%\s+(\w+)\s+((["']).*?\3)\s*>/um 11 | # 12 | # 13 | def initialize src 14 | super() 15 | md = nil 16 | if src.match( PUBLIC ) 17 | md = src.match( PUBLIC, true ) 18 | @middle = "PUBLIC" 19 | @content = "#{md[2]} #{md[4]}" 20 | elsif src.match( SYSTEM ) 21 | md = src.match( SYSTEM, true ) 22 | @middle = "SYSTEM" 23 | @content = md[2] 24 | elsif src.match( PLAIN ) 25 | md = src.match( PLAIN, true ) 26 | @middle = "" 27 | @content = md[2] 28 | elsif src.match( PERCENT ) 29 | md = src.match( PERCENT, true ) 30 | @middle = "" 31 | @content = md[2] 32 | end 33 | raise ParseException.new("failed Entity match", src) if md.nil? 34 | @name = md[1] 35 | end 36 | 37 | def to_s 38 | rv = " 0 40 | rv << @content 41 | rv 42 | end 43 | 44 | def write( output, indent ) 45 | indent( output, indent ) 46 | output << to_s 47 | end 48 | 49 | def EntityDecl.parse_source source, listener 50 | md = source.match( PATTERN_RE, true ) 51 | thing = md[0].squeeze(" \t\n\r") 52 | listener.send inspect.downcase, thing 53 | end 54 | end 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_dtd/notationdecl.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/child.rb" 2 | module REXML 3 | module DTD 4 | class NotationDecl < Child 5 | START = "/um 8 | SYSTEM = /^\s*#{START}\s+(\w[\w-]*)\s+(SYSTEM)\s+((["']).*?\4)\s*>/um 9 | def initialize src 10 | super() 11 | if src.match( PUBLIC ) 12 | md = src.match( PUBLIC, true ) 13 | elsif src.match( SYSTEM ) 14 | md = src.match( SYSTEM, true ) 15 | else 16 | raise ParseException.new( "error parsing notation: no matching pattern", src ) 17 | end 18 | @name = md[1] 19 | @middle = md[2] 20 | @rest = md[3] 21 | end 22 | 23 | def to_s 24 | "" 25 | end 26 | 27 | def write( output, indent ) 28 | indent( output, indent ) 29 | output << to_s 30 | end 31 | 32 | def NotationDecl.parse_source source, listener 33 | md = source.match( PATTERN_RE, true ) 34 | thing = md[0].squeeze(" \t\n\r") 35 | listener.send inspect.downcase, thing 36 | end 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/EUC-JP.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Encoding 3 | begin 4 | Sketchup::require 'uconv' 5 | 6 | def decode_eucjp(str) 7 | Uconv::euctou8(str) 8 | end 9 | 10 | def encode_eucjp content 11 | Uconv::u8toeuc(content) 12 | end 13 | rescue LoadError 14 | Sketchup::require 'nkf' 15 | 16 | EUCTOU8 = '-Ewm0' 17 | U8TOEUC = '-Wem0' 18 | 19 | def decode_eucjp(str) 20 | NKF.nkf(EUCTOU8, str) 21 | end 22 | 23 | def encode_eucjp content 24 | NKF.nkf(U8TOEUC, content) 25 | end 26 | end 27 | 28 | register("EUC-JP") do |obj| 29 | class << obj 30 | alias decode decode_eucjp 31 | alias encode encode_eucjp 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/ICONV.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "iconv.rb" 2 | raise LoadError unless defined? Iconv 3 | 4 | module REXML 5 | module Encoding 6 | def decode_iconv(str) 7 | Iconv.conv(UTF_8, @encoding, str) 8 | end 9 | 10 | def encode_iconv(content) 11 | Iconv.conv(@encoding, UTF_8, content) 12 | end 13 | 14 | register("ICONV") do |obj| 15 | Iconv.conv(UTF_8, obj.encoding, nil) 16 | class << obj 17 | alias decode decode_iconv 18 | alias encode encode_iconv 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/ISO-8859-1.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/geores_encodings/US-ASCII.rb' 2 | 3 | module REXML 4 | module Encoding 5 | register("ISO-8859-1", &encoding_method("US-ASCII")) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/ISO-8859-15.rb: -------------------------------------------------------------------------------- 1 | # 2 | # This class was contributed by Mikko Tiihonen mikko DOT tiihonen AT hut DOT fi 3 | # 4 | module REXML 5 | module Encoding 6 | register("ISO-8859-15") do |o| 7 | alias encode to_iso_8859_15 8 | alias decode from_iso_8859_15 9 | end 10 | 11 | # Convert from UTF-8 12 | def to_iso_8859_15(content) 13 | array_utf8 = content.unpack('U*') 14 | array_enc = [] 15 | array_utf8.each do |num| 16 | case num 17 | # shortcut first bunch basic characters 18 | when 0..0xA3; array_enc << num 19 | # characters removed compared to iso-8859-1 20 | when 0xA4; array_enc << '¤' 21 | when 0xA6; array_enc << '¦' 22 | when 0xA8; array_enc << '¨' 23 | when 0xB4; array_enc << '´' 24 | when 0xB8; array_enc << '¸' 25 | when 0xBC; array_enc << '¼' 26 | when 0xBD; array_enc << '½' 27 | when 0xBE; array_enc << '¾' 28 | # characters added compared to iso-8859-1 29 | when 0x20AC; array_enc << 0xA4 # 0xe2 0x82 0xac 30 | when 0x0160; array_enc << 0xA6 # 0xc5 0xa0 31 | when 0x0161; array_enc << 0xA8 # 0xc5 0xa1 32 | when 0x017D; array_enc << 0xB4 # 0xc5 0xbd 33 | when 0x017E; array_enc << 0xB8 # 0xc5 0xbe 34 | when 0x0152; array_enc << 0xBC # 0xc5 0x92 35 | when 0x0153; array_enc << 0xBD # 0xc5 0x93 36 | when 0x0178; array_enc << 0xBE # 0xc5 0xb8 37 | else 38 | # all remaining basic characters can be used directly 39 | if num <= 0xFF 40 | array_enc << num 41 | else 42 | # Numeric entity (&#nnnn;); shard by Stefan Scholl 43 | array_enc.concat "&\##{num};".unpack('C*') 44 | end 45 | end 46 | end 47 | array_enc.pack('C*') 48 | end 49 | 50 | # Convert to UTF-8 51 | def from_iso_8859_15(str) 52 | array_latin9 = str.unpack('C*') 53 | array_enc = [] 54 | array_latin9.each do |num| 55 | case num 56 | # characters that differ compared to iso-8859-1 57 | when 0xA4; array_enc << 0x20AC 58 | when 0xA6; array_enc << 0x0160 59 | when 0xA8; array_enc << 0x0161 60 | when 0xB4; array_enc << 0x017D 61 | when 0xB8; array_enc << 0x017E 62 | when 0xBC; array_enc << 0x0152 63 | when 0xBD; array_enc << 0x0153 64 | when 0xBE; array_enc << 0x0178 65 | else 66 | array_enc << num 67 | end 68 | end 69 | array_enc.pack('U*') 70 | end 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/SHIFT-JIS.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Encoding 3 | begin 4 | require 'uconv' 5 | 6 | def decode_sjis content 7 | Uconv::sjistou8(content) 8 | end 9 | 10 | def encode_sjis(str) 11 | Uconv::u8tosjis(str) 12 | end 13 | rescue LoadError 14 | require 'nkf' 15 | 16 | SJISTOU8 = '-Swm0' 17 | U8TOSJIS = '-Wsm0' 18 | 19 | def decode_sjis(str) 20 | NKF.nkf(SJISTOU8, str) 21 | end 22 | 23 | def encode_sjis content 24 | NKF.nkf(U8TOSJIS, content) 25 | end 26 | end 27 | 28 | b = proc do |obj| 29 | class << obj 30 | alias decode decode_sjis 31 | alias encode encode_sjis 32 | end 33 | end 34 | register("SHIFT-JIS", &b) 35 | register("SHIFT_JIS", &b) 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/SHIFT_JIS.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/geores_encodings/SHIFT-JIS.rb' 2 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/UNILE.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Encoding 3 | def encode_unile content 4 | array_utf8 = content.unpack("U*") 5 | array_enc = [] 6 | array_utf8.each do |num| 7 | if ((num>>16) > 0) 8 | array_enc << ?? 9 | array_enc << 0 10 | else 11 | array_enc << (num & 0xFF) 12 | array_enc << (num >> 8) 13 | end 14 | end 15 | array_enc.pack('C*') 16 | end 17 | 18 | def decode_unile(str) 19 | array_enc=str.unpack('C*') 20 | array_utf8 = [] 21 | 0.step(array_enc.size-1, 2){|i| 22 | array_utf8 << (array_enc.at(i) + array_enc.at(i+1)*0x100) 23 | } 24 | array_utf8.pack('U*') 25 | end 26 | 27 | register(UNILE) do |obj| 28 | class << obj 29 | alias decode decode_unile 30 | alias encode encode_unile 31 | end 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/US-ASCII.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Encoding 3 | # Convert from UTF-8 4 | def encode_ascii content 5 | array_utf8 = content.unpack('U*') 6 | array_enc = [] 7 | array_utf8.each do |num| 8 | if num <= 0x7F 9 | array_enc << num 10 | else 11 | # Numeric entity (&#nnnn;); shard by Stefan Scholl 12 | array_enc.concat "&\##{num};".unpack('C*') 13 | end 14 | end 15 | array_enc.pack('C*') 16 | end 17 | 18 | # Convert to UTF-8 19 | def decode_ascii(str) 20 | str.unpack('C*').pack('U*') 21 | end 22 | 23 | register("US-ASCII") do |obj| 24 | class << obj 25 | alias decode decode_ascii 26 | alias encode encode_ascii 27 | end 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/UTF-16.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Encoding 3 | def encode_utf16 content 4 | array_utf8 = content.unpack("U*") 5 | array_enc = [] 6 | array_utf8.each do |num| 7 | if ((num>>16) > 0) 8 | array_enc << 0 9 | array_enc << ?? 10 | else 11 | array_enc << (num >> 8) 12 | array_enc << (num & 0xFF) 13 | end 14 | end 15 | array_enc.pack('C*') 16 | end 17 | 18 | def decode_utf16(str) 19 | str = str[2..-1] if /^\376\377/n =~ str 20 | array_enc=str.unpack('C*') 21 | array_utf8 = [] 22 | 0.step(array_enc.size-1, 2){|i| 23 | array_utf8 << (array_enc.at(i+1) + array_enc.at(i)*0x100) 24 | } 25 | array_utf8.pack('U*') 26 | end 27 | 28 | register(UTF_16) do |obj| 29 | class << obj 30 | alias decode decode_utf16 31 | alias encode encode_utf16 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_encodings/UTF-8.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Encoding 3 | def encode_utf8 content 4 | content 5 | end 6 | 7 | def decode_utf8(str) 8 | str 9 | end 10 | 11 | register(UTF_8) do |obj| 12 | class << obj 13 | alias decode decode_utf8 14 | alias encode encode_utf8 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_formatters/default.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Formatters 3 | class Default 4 | # Prints out the XML document with no formatting -- except if id_hack is 5 | # set. 6 | # 7 | # ie_hack:: 8 | # If set to true, then inserts whitespace before the close of an empty 9 | # tag, so that IE's bad XML parser doesn't choke. 10 | def initialize( ie_hack=false ) 11 | @ie_hack = ie_hack 12 | end 13 | 14 | # Writes the node to some output. 15 | # 16 | # node:: 17 | # The node to write 18 | # output:: 19 | # A class implementing <<. Pass in an Output object to 20 | # change the output encoding. 21 | def write( node, output ) 22 | case node 23 | 24 | when Document 25 | if node.xml_decl.encoding != "UTF-8" && !output.kind_of?(Output) 26 | output = Output.new( output, node.xml_decl.encoding ) 27 | end 28 | write_document( node, output ) 29 | 30 | when Element 31 | write_element( node, output ) 32 | 33 | when Declaration, ElementDecl, NotationDecl, ExternalEntity, Entity, 34 | Attribute, AttlistDecl 35 | node.write( output,-1 ) 36 | 37 | when Instruction 38 | write_instruction( node, output ) 39 | 40 | when DocType, XMLDecl 41 | node.write( output ) 42 | 43 | when Comment 44 | write_comment( node, output ) 45 | 46 | when CData 47 | write_cdata( node, output ) 48 | 49 | when Text 50 | write_text( node, output ) 51 | 52 | else 53 | raise Exception.new("XML FORMATTING ERROR") 54 | 55 | end 56 | end 57 | 58 | protected 59 | def write_document( node, output ) 60 | node.children.each { |child| write( child, output ) } 61 | end 62 | 63 | def write_element( node, output ) 64 | output << "<#{node.expanded_name}" 65 | 66 | node.attributes.each_attribute do |attr| 67 | output << " " 68 | attr.write( output ) 69 | end unless node.attributes.empty? 70 | 71 | if node.children.empty? 72 | output << " " if @ie_hack 73 | output << "/" 74 | else 75 | output << ">" 76 | node.children.each { |child| 77 | write( child, output ) 78 | } 79 | output << "" 82 | end 83 | 84 | def write_text( node, output ) 85 | output << node.to_s() 86 | end 87 | 88 | def write_comment( node, output ) 89 | output << Comment::START 90 | output << node.to_s 91 | output << Comment::STOP 92 | end 93 | 94 | def write_cdata( node, output ) 95 | output << CData::START 96 | output << node.to_s 97 | output << CData::STOP 98 | end 99 | 100 | def write_instruction( node, output ) 101 | output << Instruction::START.sub(/\\/u, '') 102 | output << node.target 103 | output << ' ' 104 | output << node.content 105 | output << Instruction::STOP.sub(/\\/u, '') 106 | end 107 | end 108 | end 109 | end 110 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_formatters/transitive.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/geores_formatters/pretty.rb' 2 | 3 | module REXML 4 | module Formatters 5 | # The Transitive formatter writes an XML document that parses to an 6 | # identical document as the source document. This means that no extra 7 | # whitespace nodes are inserted, and whitespace within text nodes is 8 | # preserved. Within these constraints, the document is pretty-printed, 9 | # with whitespace inserted into the metadata to introduce formatting. 10 | # 11 | # Note that this is only useful if the original XML is not already 12 | # formatted. Since this formatter does not alter whitespace nodes, the 13 | # results of formatting already formatted XML will be odd. 14 | class Transitive < Default 15 | def initialize( indentation=2 ) 16 | @indentation = indentation 17 | @level = 0 18 | end 19 | 20 | protected 21 | def write_element( node, output ) 22 | output << "<#{node.expanded_name}" 23 | 24 | node.attributes.each_attribute do |attr| 25 | output << " " 26 | attr.write( output ) 27 | end unless node.attributes.empty? 28 | 29 | output << "\n" 30 | output << ' '*@level 31 | if node.children.empty? 32 | output << "/" 33 | else 34 | output << ">" 35 | # If compact and all children are text, and if the formatted output 36 | # is less than the specified width, then try to print everything on 37 | # one line 38 | skip = false 39 | @level += @indentation 40 | node.children.each { |child| 41 | write( child, output ) 42 | } 43 | @level -= @indentation 44 | output << "" 49 | end 50 | 51 | def write_text( node, output ) 52 | output << node.to_s() 53 | end 54 | end 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_parsers/lightparser.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'rexml/parsers/streamparser.rb' 2 | Sketchup::require 'rexml/parsers/baseparser.rb' 3 | Sketchup::require 'rexml/light/node.rb' 4 | 5 | module REXML 6 | module Parsers 7 | class LightParser 8 | def initialize stream 9 | @stream = stream 10 | @parser = REXML::Parsers::BaseParser.new( stream ) 11 | end 12 | 13 | def add_listener( listener ) 14 | @parser.add_listener( listener ) 15 | end 16 | 17 | def rewind 18 | @stream.rewind 19 | @parser.stream = @stream 20 | end 21 | 22 | def parse 23 | root = context = [ :document ] 24 | while true 25 | event = @parser.pull 26 | case event[0] 27 | when :end_document 28 | break 29 | when :end_doctype 30 | context = context[1] 31 | when :start_element, :start_doctype 32 | new_node = event 33 | context << new_node 34 | new_node[1,0] = [context] 35 | context = new_node 36 | when :end_element, :end_doctype 37 | context = context[1] 38 | else 39 | new_node = event 40 | context << new_node 41 | new_node[1,0] = [context] 42 | end 43 | end 44 | root 45 | end 46 | end 47 | 48 | # An element is an array. The array contains: 49 | # 0 The parent element 50 | # 1 The tag name 51 | # 2 A hash of attributes 52 | # 3..-1 The child elements 53 | # An element is an array of size > 3 54 | # Text is a String 55 | # PIs are [ :processing_instruction, target, data ] 56 | # Comments are [ :comment, data ] 57 | # DocTypes are DocType structs 58 | # The root is an array with XMLDecls, Text, DocType, Array, Text 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_parsers/streamparser.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Parsers 3 | class StreamParser 4 | def initialize source, listener 5 | @listener = listener 6 | @parser = BaseParser.new( source ) 7 | end 8 | 9 | def add_listener( listener ) 10 | @parser.add_listener( listener ) 11 | end 12 | 13 | def parse 14 | # entity string 15 | while true 16 | event = @parser.pull 17 | case event[0] 18 | when :end_document 19 | return 20 | when :start_element 21 | attrs = event[2].each do |n, v| 22 | event[2][n] = @parser.unnormalize( v ) 23 | end 24 | @listener.tag_start( event[1], attrs ) 25 | when :end_element 26 | @listener.tag_end( event[1] ) 27 | when :text 28 | normalized = @parser.unnormalize( event[1] ) 29 | @listener.text( normalized ) 30 | when :processing_instruction 31 | @listener.instruction( *event[1,2] ) 32 | when :start_doctype 33 | @listener.doctype( *event[1..-1] ) 34 | when :end_doctype 35 | # FIXME: remove this condition for milestone:3.2 36 | @listener.doctype_end if @listener.respond_to? :doctype_end 37 | when :comment, :attlistdecl, :cdata, :xmldecl, :elementdecl 38 | @listener.send( event[0].to_s, *event[1..-1] ) 39 | when :entitydecl, :notationdecl 40 | @listener.send( event[0].to_s, event[1..-1] ) 41 | end 42 | end 43 | end 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_parsers/treeparser.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/geores_validation/validationexception.rb' 2 | 3 | module REXML 4 | module Parsers 5 | class TreeParser 6 | def initialize( source, build_context = Document.new ) 7 | @build_context = build_context 8 | @parser = Parsers::BaseParser.new( source ) 9 | end 10 | 11 | def add_listener( listener ) 12 | @parser.add_listener( listener ) 13 | end 14 | 15 | def parse 16 | tag_stack = [] 17 | in_doctype = false 18 | entities = nil 19 | begin 20 | while true 21 | event = @parser.pull 22 | #STDERR.puts "TREEPARSER GOT #{event.inspect}" 23 | case event[0] 24 | when :end_document 25 | unless tag_stack.empty? 26 | #raise ParseException.new("No close tag for #{tag_stack.inspect}") 27 | raise ParseException.new("No close tag for #{@build_context.xpath}") 28 | end 29 | return 30 | when :start_element 31 | tag_stack.push(event[1]) 32 | # find the observers for namespaces 33 | @build_context = @build_context.add_element( event[1], event[2] ) 34 | when :end_element 35 | tag_stack.pop 36 | @build_context = @build_context.parent 37 | when :text 38 | if not in_doctype 39 | if @build_context[-1].instance_of? Text 40 | @build_context[-1] << event[1] 41 | else 42 | @build_context.add( 43 | Text.new(event[1], @build_context.whitespace, nil, true) 44 | ) unless ( 45 | @build_context.ignore_whitespace_nodes and 46 | event[1].strip.size==0 47 | ) 48 | end 49 | end 50 | when :comment 51 | c = Comment.new( event[1] ) 52 | @build_context.add( c ) 53 | when :cdata 54 | c = CData.new( event[1] ) 55 | @build_context.add( c ) 56 | when :processing_instruction 57 | @build_context.add( Instruction.new( event[1], event[2] ) ) 58 | when :end_doctype 59 | in_doctype = false 60 | entities.each { |k,v| entities[k] = @build_context.entities[k].value } 61 | @build_context = @build_context.parent 62 | when :start_doctype 63 | doctype = DocType.new( event[1..-1], @build_context ) 64 | @build_context = doctype 65 | entities = {} 66 | in_doctype = true 67 | when :attlistdecl 68 | n = AttlistDecl.new( event[1..-1] ) 69 | @build_context.add( n ) 70 | when :externalentity 71 | n = ExternalEntity.new( event[1] ) 72 | @build_context.add( n ) 73 | when :elementdecl 74 | n = ElementDecl.new( event[1] ) 75 | @build_context.add(n) 76 | when :entitydecl 77 | entities[ event[1] ] = event[2] unless event[2] =~ /PUBLIC|SYSTEM/ 78 | @build_context.add(Entity.new(event)) 79 | when :notationdecl 80 | n = NotationDecl.new( *event[1..-1] ) 81 | @build_context.add( n ) 82 | when :xmldecl 83 | x = XMLDecl.new( event[1], event[2], event[3] ) 84 | @build_context.add( x ) 85 | end 86 | end 87 | rescue REXML::Validation::ValidationException 88 | raise 89 | rescue 90 | raise ParseException.new( $!.message, @parser.source, @parser, $! ) 91 | end 92 | end 93 | end 94 | end 95 | end 96 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_parsers/ultralightparser.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/geores_parsers/streamparser.rb' 2 | Sketchup::require 'geores_src/geores_import/geores_rexml/geores_parsers/baseparser.rb' 3 | 4 | module REXML 5 | module Parsers 6 | class UltraLightParser 7 | def initialize stream 8 | @stream = stream 9 | @parser = REXML::Parsers::BaseParser.new( stream ) 10 | end 11 | 12 | def add_listener( listener ) 13 | @parser.add_listener( listener ) 14 | end 15 | 16 | def rewind 17 | @stream.rewind 18 | @parser.stream = @stream 19 | end 20 | 21 | def parse 22 | root = context = [] 23 | while true 24 | event = @parser.pull 25 | case event[0] 26 | when :end_document 27 | break 28 | when :end_doctype 29 | context = context[1] 30 | when :start_element, :doctype 31 | context << event 32 | event[1,0] = [context] 33 | context = event 34 | when :end_element 35 | context = context[1] 36 | else 37 | context << event 38 | end 39 | end 40 | root 41 | end 42 | end 43 | 44 | # An element is an array. The array contains: 45 | # 0 The parent element 46 | # 1 The tag name 47 | # 2 A hash of attributes 48 | # 3..-1 The child elements 49 | # An element is an array of size > 3 50 | # Text is a String 51 | # PIs are [ :processing_instruction, target, data ] 52 | # Comments are [ :comment, data ] 53 | # DocTypes are DocType structs 54 | # The root is an array with XMLDecls, Text, DocType, Array, Text 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/geores_validation/validationexception.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | module Validation 3 | class ValidationException < RuntimeError 4 | def initialize msg 5 | super 6 | end 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/instruction.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/child.rb" 2 | Sketchup::require "geores_src/geores_import/geores_rexml/source.rb" 3 | 4 | module REXML 5 | # Represents an XML Instruction; IE, 6 | # TODO: Add parent arg (3rd arg) to constructor 7 | class Instruction < Child 8 | START = '<\?' 9 | STOP = '\?>' 10 | 11 | # target is the "name" of the Instruction; IE, the "tag" in 12 | # content is everything else. 13 | attr_accessor :target, :content 14 | 15 | # Constructs a new Instruction 16 | # @param target can be one of a number of things. If String, then 17 | # the target of this instruction is set to this. If an Instruction, 18 | # then the Instruction is shallowly cloned (target and content are 19 | # copied). If a Source, then the source is scanned and parsed for 20 | # an Instruction declaration. 21 | # @param content Must be either a String, or a Parent. Can only 22 | # be a Parent if the target argument is a Source. Otherwise, this 23 | # String is set as the content of this instruction. 24 | def initialize(target, content=nil) 25 | if target.kind_of? String 26 | super() 27 | @target = target 28 | @content = content 29 | elsif target.kind_of? Instruction 30 | super(content) 31 | @target = target.target 32 | @content = target.content 33 | end 34 | @content.strip! if @content 35 | end 36 | 37 | def clone 38 | Instruction.new self 39 | end 40 | 41 | # == DEPRECATED 42 | # See the rexml/formatters package 43 | # 44 | def write writer, indent=-1, transitive=false, ie_hack=false 45 | Kernel.warn( "#{self.class.name}.write is deprecated" ) 46 | indent(writer, indent) 47 | writer << START.sub(/\\/u, '') 48 | writer << @target 49 | writer << ' ' 50 | writer << @content 51 | writer << STOP.sub(/\\/u, '') 52 | end 53 | 54 | # @return true if other is an Instruction, and the content and target 55 | # of the other matches the target and content of this object. 56 | def ==( other ) 57 | other.kind_of? Instruction and 58 | other.target == @target and 59 | other.content == @content 60 | end 61 | 62 | def node_type 63 | :processing_instruction 64 | end 65 | 66 | def inspect 67 | "" 68 | end 69 | end 70 | end 71 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/namespace.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/xmltokens.rb' 2 | 3 | module REXML 4 | # Adds named attributes to an object. 5 | module Namespace 6 | # The name of the object, valid if set 7 | attr_reader :name, :expanded_name 8 | # The expanded name of the object, valid if name is set 9 | attr_accessor :prefix 10 | include XMLTokens 11 | NAMESPLIT = /^(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})/u 12 | 13 | # Sets the name and the expanded name 14 | def name=( name ) 15 | @expanded_name = name 16 | name =~ NAMESPLIT 17 | if $1 18 | @prefix = $1 19 | else 20 | @prefix = "" 21 | @namespace = "" 22 | end 23 | @name = $2 24 | end 25 | 26 | # Compares names optionally WITH namespaces 27 | def has_name?( other, ns=nil ) 28 | if ns 29 | return (namespace() == ns and name() == other) 30 | elsif other.include? ":" 31 | return fully_expanded_name == other 32 | else 33 | return name == other 34 | end 35 | end 36 | 37 | alias :local_name :name 38 | 39 | # Fully expand the name, even if the prefix wasn't specified in the 40 | # source file. 41 | def fully_expanded_name 42 | ns = prefix 43 | return "#{ns}:#@name" if ns.size > 0 44 | return @name 45 | end 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/node.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require "geores_src/geores_import/geores_rexml/parseexception.rb" 2 | Sketchup::require "geores_src/geores_import/geores_rexml/geores_formatters/pretty.rb" 3 | Sketchup::require "geores_src/geores_import/geores_rexml/geores_formatters/default.rb" 4 | 5 | module REXML 6 | # Represents a node in the tree. Nodes are never encountered except as 7 | # superclasses of other objects. Nodes have siblings. 8 | module Node 9 | # @return the next sibling (nil if unset) 10 | def next_sibling_node 11 | return nil if @parent.nil? 12 | @parent[ @parent.index(self) + 1 ] 13 | end 14 | 15 | # @return the previous sibling (nil if unset) 16 | def previous_sibling_node 17 | return nil if @parent.nil? 18 | ind = @parent.index(self) 19 | return nil if ind == 0 20 | @parent[ ind - 1 ] 21 | end 22 | 23 | # indent:: 24 | # *DEPRECATED* This parameter is now ignored. See the formatters in the 25 | # REXML::Formatters package for changing the output style. 26 | def to_s indent=nil 27 | unless indent.nil? 28 | Kernel.warn( "#{self.class.name}.to_s(indent) parameter is deprecated" ) 29 | f = REXML::Formatters::Pretty.new( indent ) 30 | f.write( self, rv, indent ) 31 | else 32 | f = REXML::Formatters::Default.new 33 | f.write( self, rv = "" ) 34 | end 35 | return rv 36 | end 37 | 38 | def indent to, ind 39 | if @parent and @parent.context and not @parent.context[:indentstyle].nil? then 40 | indentstyle = @parent.context[:indentstyle] 41 | else 42 | indentstyle = ' ' 43 | end 44 | to << indentstyle*ind unless ind<1 45 | end 46 | 47 | def parent? 48 | false; 49 | end 50 | 51 | 52 | # Visit all subnodes of +self+ recursively 53 | def each_recursive(&block) # :yields: node 54 | self.elements.each {|node| 55 | block.call(node) 56 | node.each_recursive(&block) 57 | } 58 | end 59 | 60 | # Find (and return) first subnode (recursively) for which the block 61 | # evaluates to true. Returns +nil+ if none was found. 62 | def find_first_recursive(&block) # :yields: node 63 | each_recursive {|node| 64 | return node if block.call(node) 65 | } 66 | return nil 67 | end 68 | 69 | # Returns the position that +self+ holds in its parent's array, indexed 70 | # from 1. 71 | def index_in_parent 72 | parent.index(self)+1 73 | end 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/output.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/encoding.rb' 2 | 3 | module REXML 4 | class Output 5 | include Encoding 6 | 7 | attr_reader :encoding 8 | 9 | def initialize real_IO, encd="iso-8859-1" 10 | @output = real_IO 11 | self.encoding = encd 12 | 13 | @to_utf = encd == UTF_8 ? false : true 14 | end 15 | 16 | def <<( content ) 17 | @output << (@to_utf ? self.encode(content) : content) 18 | end 19 | 20 | def to_s 21 | "Output[#{encoding}]" 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/parseexception.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | class ParseException < RuntimeError 3 | attr_accessor :source, :parser, :continued_exception 4 | 5 | def initialize( message, source=nil, parser=nil, exception=nil ) 6 | super(message) 7 | @source = source 8 | @parser = parser 9 | @continued_exception = exception 10 | end 11 | 12 | def to_s 13 | # Quote the original exception, if there was one 14 | if @continued_exception 15 | err = @continued_exception.inspect 16 | err << "\n" 17 | err << @continued_exception.backtrace.join("\n") 18 | err << "\n...\n" 19 | else 20 | err = "" 21 | end 22 | 23 | # Get the stack trace and error message 24 | err << super 25 | 26 | # Add contextual information 27 | if @source 28 | err << "\nLine: #{line}\n" 29 | err << "Position: #{position}\n" 30 | err << "Last 80 unconsumed characters:\n" 31 | err << @source.buffer[0..80].gsub(/\n/, ' ') 32 | end 33 | 34 | err 35 | end 36 | 37 | def position 38 | @source.current_line[0] if @source and defined? @source.current_line and 39 | @source.current_line 40 | end 41 | 42 | def line 43 | @source.current_line[2] if @source and defined? @source.current_line and 44 | @source.current_line 45 | end 46 | 47 | def context 48 | @source.current_line 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/rexml.rb: -------------------------------------------------------------------------------- 1 | # REXML is an XML toolkit for Ruby[http://www.ruby-lang.org], in Ruby. 2 | # 3 | # REXML is a _pure_ Ruby, XML 1.0 conforming, 4 | # non-validating[http://www.w3.org/TR/2004/REC-xml-20040204/#sec-conformance] 5 | # toolkit with an intuitive API. REXML passes 100% of the non-validating Oasis 6 | # tests[http://www.oasis-open.org/committees/xml-conformance/xml-test-suite.shtml], 7 | # and provides tree, stream, SAX2, pull, and lightweight APIs. REXML also 8 | # includes a full XPath[http://www.w3c.org/tr/xpath] 1.0 implementation. Since 9 | # Ruby 1.8, REXML is included in the standard Ruby distribution. 10 | # 11 | # Main page:: http://www.germane-software.com/software/rexml 12 | # Author:: Sean Russell 13 | # Version:: 3.1.7.1 14 | # Date:: 2007/209 15 | # 16 | # This API documentation can be downloaded from the REXML home page, or can 17 | # be accessed online[http://www.germane-software.com/software/rexml_doc] 18 | # 19 | # A tutorial is available in the REXML distribution in docs/tutorial.html, 20 | # or can be accessed 21 | # online[http://www.germane-software.com/software/geores_rexml/docs/tutorial.html] 22 | module REXML 23 | COPYRIGHT = "Copyright © 2001-2007 Sean Russell " 24 | DATE = "2007/209" 25 | VERSION = "3.1.7.1" 26 | REVISION = "$Revision: 1270$".gsub(/\$Revision:|\$/,'').strip 27 | 28 | Copyright = COPYRIGHT 29 | Version = VERSION 30 | end 31 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/sax2listener.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | # A template for stream parser listeners. 3 | # Note that the declarations (attlistdecl, elementdecl, etc) are trivially 4 | # processed; REXML doesn't yet handle doctype entity declarations, so you 5 | # have to parse them out yourself. 6 | # === Missing methods from SAX2 7 | # ignorable_whitespace 8 | # === Methods extending SAX2 9 | # +WARNING+ 10 | # These methods are certainly going to change, until DTDs are fully 11 | # supported. Be aware of this. 12 | # start_document 13 | # end_document 14 | # doctype 15 | # elementdecl 16 | # attlistdecl 17 | # entitydecl 18 | # notationdecl 19 | # cdata 20 | # xmldecl 21 | # comment 22 | module SAX2Listener 23 | def start_document 24 | end 25 | def end_document 26 | end 27 | def start_prefix_mapping prefix, uri 28 | end 29 | def end_prefix_mapping prefix 30 | end 31 | def start_element uri, localname, qname, attributes 32 | end 33 | def end_element uri, localname, qname 34 | end 35 | def characters text 36 | end 37 | def processing_instruction target, data 38 | end 39 | # Handles a doctype declaration. Any attributes of the doctype which are 40 | # not supplied will be nil. # EG, 41 | # @p name the name of the doctype; EG, "me" 42 | # @p pub_sys "PUBLIC", "SYSTEM", or nil. EG, "PUBLIC" 43 | # @p long_name the supplied long name, or nil. EG, "foo" 44 | # @p uri the uri of the doctype, or nil. EG, "bar" 45 | def doctype name, pub_sys, long_name, uri 46 | end 47 | # If a doctype includes an ATTLIST declaration, it will cause this 48 | # method to be called. The content is the declaration itself, unparsed. 49 | # EG, will come to this method as "el 50 | # attr CDATA #REQUIRED". This is the same for all of the .*decl 51 | # methods. 52 | def attlistdecl(element, pairs, contents) 53 | end 54 | # 55 | def elementdecl content 56 | end 57 | # 58 | # The argument passed to this method is an array of the entity 59 | # declaration. It can be in a number of formats, but in general it 60 | # returns (example, result): 61 | # 62 | # ["%", "YN", "'\"Yes\"'", "\""] 63 | # 64 | # ["%", "YN", "'Yes'", "s"] 65 | # 66 | # ["WhatHeSaid", "\"He said %YN;\"", "YN"] 67 | # 68 | # ["open-hatch", "SYSTEM", "\"http://www.textuality.com/boilerplate/OpenHatch.xml\""] 69 | # 70 | # ["open-hatch", "PUBLIC", "\"-//Textuality//TEXT Standard open-hatch boilerplate//EN\"", "\"http://www.textuality.com/boilerplate/OpenHatch.xml\""] 71 | # 72 | # ["hatch-pic", "SYSTEM", "\"../grafix/OpenHatch.gif\"", "\n\t\t\t\t\t\t\tNDATA gif", "gif"] 73 | def entitydecl name, decl 74 | end 75 | # 76 | def notationdecl content 77 | end 78 | # Called when is encountered in a document. 79 | # @p content "..." 80 | def cdata content 81 | end 82 | # Called when an XML PI is encountered in the document. 83 | # EG: 84 | # @p version the version attribute value. EG, "1.0" 85 | # @p encoding the encoding attribute value, or nil. EG, "utf" 86 | # @p standalone the standalone attribute value, or nil. EG, nil 87 | # @p spaced the declaration is followed by a line break 88 | def xmldecl version, encoding, standalone 89 | end 90 | # Called when a comment is encountered. 91 | # @p comment The content of the comment 92 | def comment comment 93 | end 94 | def progress position 95 | end 96 | end 97 | end 98 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/streamlistener.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | # A template for stream parser listeners. 3 | # Note that the declarations (attlistdecl, elementdecl, etc) are trivially 4 | # processed; REXML doesn't yet handle doctype entity declarations, so you 5 | # have to parse them out yourself. 6 | module StreamListener 7 | # Called when a tag is encountered. 8 | # @p name the tag name 9 | # @p attrs an array of arrays of attribute/value pairs, suitable for 10 | # use with assoc or rassoc. IE, 11 | # will result in 12 | # tag_start( "tag", # [["attr1","value1"],["attr2","value2"]]) 13 | def tag_start name, attrs 14 | end 15 | # Called when the end tag is reached. In the case of , tag_end 16 | # will be called immidiately after tag_start 17 | # @p the name of the tag 18 | def tag_end name 19 | end 20 | # Called when text is encountered in the document 21 | # @p text the text content. 22 | def text text 23 | end 24 | # Called when an instruction is encountered. EG: 25 | # @p name the instruction name; in the example, "xsl" 26 | # @p instruction the rest of the instruction. In the example, 27 | # "sheet='foo'" 28 | def instruction name, instruction 29 | end 30 | # Called when a comment is encountered. 31 | # @p comment The content of the comment 32 | def comment comment 33 | end 34 | # Handles a doctype declaration. Any attributes of the doctype which are 35 | # not supplied will be nil. # EG, 36 | # @p name the name of the doctype; EG, "me" 37 | # @p pub_sys "PUBLIC", "SYSTEM", or nil. EG, "PUBLIC" 38 | # @p long_name the supplied long name, or nil. EG, "foo" 39 | # @p uri the uri of the doctype, or nil. EG, "bar" 40 | def doctype name, pub_sys, long_name, uri 41 | end 42 | # Called when the doctype is done 43 | def doctype_end 44 | end 45 | # If a doctype includes an ATTLIST declaration, it will cause this 46 | # method to be called. The content is the declaration itself, unparsed. 47 | # EG, will come to this method as "el 48 | # attr CDATA #REQUIRED". This is the same for all of the .*decl 49 | # methods. 50 | def attlistdecl element_name, attributes, raw_content 51 | end 52 | # 53 | def elementdecl content 54 | end 55 | # 56 | # The argument passed to this method is an array of the entity 57 | # declaration. It can be in a number of formats, but in general it 58 | # returns (example, result): 59 | # 60 | # ["%", "YN", "'\"Yes\"'", "\""] 61 | # 62 | # ["%", "YN", "'Yes'", "s"] 63 | # 64 | # ["WhatHeSaid", "\"He said %YN;\"", "YN"] 65 | # 66 | # ["open-hatch", "SYSTEM", "\"http://www.textuality.com/boilerplate/OpenHatch.xml\""] 67 | # 68 | # ["open-hatch", "PUBLIC", "\"-//Textuality//TEXT Standard open-hatch boilerplate//EN\"", "\"http://www.textuality.com/boilerplate/OpenHatch.xml\""] 69 | # 70 | # ["hatch-pic", "SYSTEM", "\"../grafix/OpenHatch.gif\"", "\n\t\t\t\t\t\t\tNDATA gif", "gif"] 71 | def entitydecl content 72 | end 73 | # 74 | def notationdecl content 75 | end 76 | # Called when %foo; is encountered in a doctype declaration. 77 | # @p content "foo" 78 | def entity content 79 | end 80 | # Called when is encountered in a document. 81 | # @p content "..." 82 | def cdata content 83 | end 84 | # Called when an XML PI is encountered in the document. 85 | # EG: 86 | # @p version the version attribute value. EG, "1.0" 87 | # @p encoding the encoding attribute value, or nil. EG, "utf" 88 | # @p standalone the standalone attribute value, or nil. EG, nil 89 | def xmldecl version, encoding, standalone 90 | end 91 | end 92 | end 93 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/syncenumerator.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | class SyncEnumerator 3 | include Enumerable 4 | 5 | # Creates a new SyncEnumerator which enumerates rows of given 6 | # Enumerable objects. 7 | def initialize(*enums) 8 | @gens = enums 9 | @biggest = @gens[0] 10 | @gens.each {|x| @biggest = x if x.size > @biggest.size } 11 | end 12 | 13 | # Returns the number of enumerated Enumerable objects, i.e. the size 14 | # of each row. 15 | def size 16 | @gens.size 17 | end 18 | 19 | # Returns the number of enumerated Enumerable objects, i.e. the size 20 | # of each row. 21 | def length 22 | @gens.length 23 | end 24 | 25 | # Enumerates rows of the Enumerable objects. 26 | def each 27 | @biggest.zip( *@gens ) {|a| 28 | yield(*a[1..-1]) 29 | } 30 | self 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/xmldecl.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/encoding.rb' 2 | Sketchup::require 'geores_src/geores_import/geores_rexml/source.rb' 3 | 4 | module REXML 5 | # NEEDS DOCUMENTATION 6 | class XMLDecl < Child 7 | include Encoding 8 | 9 | DEFAULT_VERSION = "1.0"; 10 | DEFAULT_ENCODING = "UTF-8"; 11 | DEFAULT_STANDALONE = "no"; 12 | START = '<\?xml'; 13 | STOP = '\?>'; 14 | 15 | attr_accessor :version, :standalone 16 | attr_reader :writeencoding, :writethis 17 | 18 | def initialize(version=DEFAULT_VERSION, encoding=nil, standalone=nil) 19 | @writethis = true 20 | @writeencoding = !encoding.nil? 21 | if version.kind_of? XMLDecl 22 | super() 23 | @version = version.version 24 | self.encoding = version.encoding 25 | @writeencoding = version.writeencoding 26 | @standalone = version.standalone 27 | else 28 | super() 29 | @version = version 30 | self.encoding = encoding 31 | @standalone = standalone 32 | end 33 | @version = DEFAULT_VERSION if @version.nil? 34 | end 35 | 36 | def clone 37 | XMLDecl.new(self) 38 | end 39 | 40 | # indent:: 41 | # Ignored. There must be no whitespace before an XML declaration 42 | # transitive:: 43 | # Ignored 44 | # ie_hack:: 45 | # Ignored 46 | def write(writer, indent=-1, transitive=false, ie_hack=false) 47 | return nil unless @writethis or writer.kind_of? Output 48 | writer << START.sub(/\\/u, '') 49 | if writer.kind_of? Output 50 | writer << " #{content writer.encoding}" 51 | else 52 | writer << " #{content encoding}" 53 | end 54 | writer << STOP.sub(/\\/u, '') 55 | end 56 | 57 | def ==( other ) 58 | other.kind_of?(XMLDecl) and 59 | other.version == @version and 60 | other.encoding == self.encoding and 61 | other.standalone == @standalone 62 | end 63 | 64 | def xmldecl version, encoding, standalone 65 | @version = version 66 | self.encoding = encoding 67 | @standalone = standalone 68 | end 69 | 70 | def node_type 71 | :xmldecl 72 | end 73 | 74 | alias :stand_alone? :standalone 75 | alias :old_enc= :encoding= 76 | 77 | def encoding=( enc ) 78 | if enc.nil? 79 | self.old_enc = "UTF-8" 80 | @writeencoding = false 81 | else 82 | self.old_enc = enc 83 | @writeencoding = true 84 | end 85 | self.dowrite 86 | end 87 | 88 | # Only use this if you do not want the XML declaration to be written; 89 | # this object is ignored by the XML writer. Otherwise, instantiate your 90 | # own XMLDecl and add it to the document. 91 | # 92 | # Note that XML 1.1 documents *must* include an XML declaration 93 | def XMLDecl.default 94 | rv = XMLDecl.new( "1.0" ) 95 | rv.nowrite 96 | rv 97 | end 98 | 99 | def nowrite 100 | @writethis = false 101 | end 102 | 103 | def dowrite 104 | @writethis = true 105 | end 106 | 107 | def inspect 108 | START.sub(/\\/u, '') + " ... " + STOP.sub(/\\/u, '') 109 | end 110 | 111 | private 112 | def content(enc) 113 | rv = "version='#@version'" 114 | rv << " encoding='#{enc}'" if @writeencoding || enc !~ /utf-8/i 115 | rv << " standalone='#@standalone'" if @standalone 116 | rv 117 | end 118 | end 119 | end 120 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/xmltokens.rb: -------------------------------------------------------------------------------- 1 | module REXML 2 | # Defines a number of tokens used for parsing XML. Not for general 3 | # consumption. 4 | module XMLTokens 5 | NCNAME_STR= '[\w:][\-\w\d.]*' 6 | NAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}" 7 | 8 | NAMECHAR = '[\-\w\d\.:]' 9 | NAME = "([\\w:]#{NAMECHAR}*)" 10 | NMTOKEN = "(?:#{NAMECHAR})+" 11 | NMTOKENS = "#{NMTOKEN}(\\s+#{NMTOKEN})*" 12 | REFERENCE = "(?:&#{NAME};|&#\\d+;|&#x[0-9a-fA-F]+;)" 13 | 14 | #REFERENCE = "(?:#{ENTITYREF}|#{CHARREF})" 15 | #ENTITYREF = "&#{NAME};" 16 | #CHARREF = "&#\\d+;|&#x[0-9a-fA-F]+;" 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /geores_src/geores_import/geores_rexml/xpath.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'geores_src/geores_import/geores_rexml/functions.rb' 2 | Sketchup::require 'geores_src/geores_import/geores_rexml/xpath_parser.rb' 3 | 4 | module REXML 5 | # Wrapper class. Use this class to access the XPath functions. 6 | class XPath 7 | include Functions 8 | EMPTY_HASH = {} 9 | 10 | # Finds and returns the first node that matches the supplied xpath. 11 | # element:: 12 | # The context element 13 | # path:: 14 | # The xpath to search for. If not supplied or nil, returns the first 15 | # node matching '*'. 16 | # namespaces:: 17 | # If supplied, a Hash which defines a namespace mapping. 18 | # 19 | # XPath.first( node ) 20 | # XPath.first( doc, "//b"} ) 21 | # XPath.first( node, "a/x:b", { "x"=>"http://doofus" } ) 22 | def XPath::first element, path=nil, namespaces=nil, variables={} 23 | raise "The namespaces argument, if supplied, must be a hash object." unless namespaces.nil? or namespaces.kind_of?(Hash) 24 | raise "The variables argument, if supplied, must be a hash object." unless variables.kind_of?(Hash) 25 | parser = XPathParser.new 26 | parser.namespaces = namespaces 27 | parser.variables = variables 28 | path = "*" unless path 29 | element = [element] unless element.kind_of? Array 30 | parser.parse(path, element).flatten[0] 31 | end 32 | 33 | # Itterates over nodes that match the given path, calling the supplied 34 | # block with the match. 35 | # element:: 36 | # The context element 37 | # path:: 38 | # The xpath to search for. If not supplied or nil, defaults to '*' 39 | # namespaces:: 40 | # If supplied, a Hash which defines a namespace mapping 41 | # 42 | # XPath.each( node ) { |el| ... } 43 | # XPath.each( node, '/*[@attr='v']' ) { |el| ... } 44 | # XPath.each( node, 'ancestor::x' ) { |el| ... } 45 | def XPath::each element, path=nil, namespaces=nil, variables={}, &block 46 | raise "The namespaces argument, if supplied, must be a hash object." unless namespaces.nil? or namespaces.kind_of?(Hash) 47 | raise "The variables argument, if supplied, must be a hash object." unless variables.kind_of?(Hash) 48 | parser = XPathParser.new 49 | parser.namespaces = namespaces 50 | parser.variables = variables 51 | path = "*" unless path 52 | element = [element] unless element.kind_of? Array 53 | parser.parse(path, element).each( &block ) 54 | end 55 | 56 | # Returns an array of nodes matching a given XPath. 57 | def XPath::match element, path=nil, namespaces=nil, variables={} 58 | parser = XPathParser.new 59 | parser.namespaces = namespaces 60 | parser.variables = variables 61 | path = "*" unless path 62 | element = [element] unless element.kind_of? Array 63 | parser.parse(path,element) 64 | end 65 | end 66 | end 67 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_boundary_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 5 | 6 | class GRES_BoundaryParser < CityObjectParser 7 | 8 | 9 | 10 | def initialize(cityobject,factory) 11 | super(cityobject, factory) 12 | @currentGRES_OpeningParser = nil 13 | @isInOpening = false 14 | 15 | @nextisclassname = false 16 | end 17 | 18 | def tag_start name, attrs 19 | 20 | GRES_CGMLDebugger.writedebugstring("GRES_BoundaryParser in tag_start mit " + name + "\n") 21 | 22 | if(@isInOpening == true) 23 | if(@nextisclassname == true) 24 | @nextisclassname = false 25 | @currentGRES_OpeningParser = @factory.getCityObjectParserForName(name) 26 | end 27 | @currentGRES_OpeningParser.tag_start(name, attrs) 28 | return false 29 | end 30 | if(name.index("RoofSurface") != nil or name.index("WallSurface") != nil or name.index("GroundSurface") != nil or name.index("ClosureSurface") != nil or 31 | name.index("CeilingSurface") != nil or name.index("FloorSurface") != nil) 32 | @cityObject.setboundarytype(name) 33 | GRES_CGMLDebugger.writedebugstring("GRES_BoundaryParser: Set Boundary Type : " + name + "\n") 34 | id = getattrvalue("gml:id", attrs) 35 | if(id != "") 36 | @cityObject.setgmlid(id) 37 | GRES_CGMLDebugger.writedebugstring("GRES_BoundaryParser: Set GML:ID Type : " + id + "for " + @cityObject.theinternalname + "\n") 38 | end 39 | end 40 | 41 | if(super(name,attrs) == false) 42 | return false 43 | end 44 | 45 | if(name.index("opening") != nil) 46 | @nextisclassname = true 47 | @isInOpening = true 48 | return false 49 | end 50 | return true 51 | end 52 | 53 | def text text 54 | if(@isInOpening == true and @currentGRES_OpeningParser!= nil) 55 | @currentGRES_OpeningParser.text(text) 56 | return false 57 | end 58 | if(super(text) == false) 59 | return false 60 | end 61 | return true 62 | end 63 | 64 | def tag_end name 65 | if(name.index("opening") != nil) 66 | @cityObject.addOpening(@currentGRES_OpeningParser.cityObject) 67 | @isInOpening = false 68 | @currentGRES_OpeningParser = nil 69 | GRES_CGMLDebugger.writedebugstring("GRES_BoundaryParser: found end tag of opening " + name + " add Opening to " + @cityObject.theinternalname + " @isInAddress= false \n") 70 | return false 71 | end 72 | if(@isInOpening == true and @currentGRES_OpeningParser != nil) 73 | @currentGRES_OpeningParser.tag_end(name) 74 | return false 75 | end 76 | if(super(name) == false) 77 | return false 78 | end 79 | return true 80 | end 81 | 82 | 83 | end 84 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_bridge_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/geores_featureparser/gres_site_parser.rb' 4 | Sketchup::require 'geores_src/geores_schema/geores_attributes/simple_city_object_attribute.rb' 5 | Sketchup::require 'geores_src/geores_parser/geores_featureparser/gres_installation_parser.rb' 6 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 7 | 8 | class GRES_BridgeParser < GRES_SiteParser 9 | 10 | 11 | 12 | def initialize(cityobject,factory) 13 | super(cityobject, factory) 14 | @currentBridgeConstructionParser = nil 15 | @isInBridgeConstruction = false 16 | @nextisclassname = false 17 | end 18 | 19 | def tag_start name, attrs 20 | 21 | GRES_CGMLDebugger.writedebugstring("BridgeParser in tag_start mit " + name + "\n") 22 | 23 | if(@isInBridgeConstruction == true) 24 | if(@nextisclassname == true) 25 | @nextisclassname = false 26 | GRES_CGMLDebugger.writedebugstring("GRES_BridgeParser: found outerBridgeConstruction . create BridgeInstallation Parser @isInBridgeConstruction true \n") 27 | @currentBridgeConstructionParser = @factory.getCityObjectParserForName(name) 28 | end 29 | @currentBridgeConstructionParser.tag_start(name, attrs) 30 | return false 31 | end 32 | if(super(name,attrs) == false) 33 | return false 34 | end 35 | 36 | if(name.index("outerBridgeConstruction") != nil) 37 | @nextisclassname = true 38 | @isInBridgeConstruction = true 39 | 40 | return false 41 | end 42 | 43 | 44 | if( name.index("isMovable") != nil) 45 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 46 | @isInSimpleAttribute = true 47 | GRES_CGMLDebugger.writedebugstring("GRES_BridgeParser: create a simple Attribute with " + name + "@isInSimpleAttribute = true \n ") 48 | return false 49 | end 50 | if(name.index("Bridge") != nil) 51 | id = getattrvalue("gml:id", attrs) 52 | if(id != "") 53 | @cityObject.setgmlid(id) 54 | GRES_CGMLDebugger.writedebugstring("GRES_BridgeParser: Set GML:ID Type : " + id + "for " + @cityObject.theinternalname + "\n") 55 | end 56 | return false 57 | end 58 | return true 59 | 60 | end 61 | 62 | def text text 63 | if(@isInBridgeConstruction == true and @currentBridgeConstructionParser != nil) 64 | @currentBridgeConstructionParser.text(text) 65 | return false 66 | end 67 | if(super(text) == false) 68 | return false 69 | end 70 | 71 | 72 | 73 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 74 | @currentSimpleAttribute.addValue(text) 75 | return false 76 | end 77 | return true 78 | end 79 | 80 | 81 | 82 | 83 | def tag_end name 84 | 85 | 86 | if(name.index("outerBridgeConstruction") != nil) 87 | @cityObject.addBridgeConstruction(@currentBridgeConstructionParser.cityObject) 88 | GRES_CGMLDebugger.writedebugstring("GRES_BridgeParser: found end tag of outerBridgeConstruction " + name + " add outerBridgeConstruction to CityObject: " + @cityObject.theinternalname + " @isInBridgeConstruction false \n") 89 | @isInBridgeConstruction = false 90 | @currentBridgeConstructionParser = nil 91 | return false 92 | end 93 | if(@isInBridgeConstruction == true and @currentBridgeConstructionParser != nil) 94 | @currentBridgeConstructionParser.tag_end(name) 95 | return false 96 | end 97 | if(super(name) == false) 98 | return false 99 | end 100 | if(name.index("isMovable") != nil) 101 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 102 | GRES_CGMLDebugger.writedebugstring("GRES_BridgeParser: found end tag of simple Attribute " + name + " add Attribute to CityObject: " + @cityObject.theinternalname + " @isInSimpleAttribute = false and @currentSimpleAttribute = nil \n") 103 | @isInSimpleAttribute = false 104 | @currentSimpleAttribute = nil 105 | return false 106 | end 107 | return true 108 | end 109 | 110 | end 111 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_building_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/geores_featureparser/gres_site_parser.rb' 4 | Sketchup::require 'geores_src/geores_schema/geores_attributes/simple_city_object_attribute.rb' 5 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 6 | 7 | 8 | class GRES_BuildingParser < GRES_SiteParser 9 | def initialize(cityobject,factory) 10 | super(cityobject, factory) 11 | end 12 | 13 | def tag_start name, attrs 14 | GRES_CGMLDebugger.writedebugstring("GRES_BuildingParser in tag_start mit " + name + "\n") 15 | b = super(name, attrs) 16 | if(b == false) 17 | return false 18 | end 19 | 20 | if(name.index("roofType") != nil or name.index("measuredHeight") != nil or name.index("storeysAboveGround") != nil or name.index("storeysBelowGround") != nil or 21 | name.index("storeyHeightsAboveGround") != nil or name.index("storeyHeightsBelowGround") != nil) 22 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 23 | @isInSimpleAttribute = true 24 | GRES_CGMLDebugger.writedebugstring("GRES_BuildingParser create a simple Attribute with " + name + "@isInSimpleAttribute = true \n ") 25 | return false 26 | 27 | end 28 | if(name.index("Building") != nil) 29 | id = getattrvalue("gml:id", attrs) 30 | if(id != "") 31 | @cityObject.setgmlid(id) 32 | GRES_CGMLDebugger.writedebugstring("GRES_BuildingParser Set GML:ID Type : " + id + "for " + @cityObject.theinternalname + "\n") 33 | end 34 | return false 35 | end 36 | return true 37 | end 38 | 39 | def text text 40 | if(super(text) == false) 41 | return false 42 | end 43 | 44 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 45 | @currentSimpleAttribute.addValue(text) 46 | return false 47 | end 48 | return true 49 | end 50 | 51 | 52 | 53 | 54 | def tag_end name 55 | 56 | if(super(name) == false) 57 | return false 58 | end 59 | if( name.index("roofType") != nil or name.index("measuredHeight") != nil or name.index("storeysAboveGround") != nil or name.index("storeysBelowGround") != nil or 60 | name.index("storeyHeightsAboveGround") != nil or name.index("storeyHeightsBelowGround") != nil) 61 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 62 | @isInSimpleAttribute = false 63 | @currentSimpleAttribute = nil 64 | GRES_CGMLDebugger.writedebugstring("GRES_BuildingParser found end tag of simple Attribute " + name + " add Attribute to CityObject: " + @cityObject.theinternalname + " @isInSimpleAttribute = false and @currentSimpleAttribute = nil \n") 65 | return false 66 | end 67 | return true 68 | end 69 | 70 | 71 | 72 | end 73 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_cityfurniture_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_parser/geores_geo/grs_implicit_geometry_parser.rb' 5 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 6 | 7 | class GRES_CityFurnitureParser < CityObjectParser 8 | @currentImplicitParser = nil 9 | @isInImplicitGeometry = false 10 | 11 | def initialize(cityobject,factory) 12 | super(cityobject, factory) 13 | end 14 | 15 | 16 | def tag_start name, attrs 17 | GRES_CGMLDebugger.writedebugstring("GRES_CityFurnitureParser in tag_start mit " + name + "\n") 18 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 19 | @currentImplicitParser.tag_start(name,attrs) 20 | return false 21 | end 22 | if(name.index("CityFurniture") != nil) 23 | id = getattrvalue("gml:id", attrs) 24 | if(id != "") 25 | @cityObject.setgmlid(id) 26 | end 27 | return false 28 | end 29 | 30 | if(super(name,attrs) == false) 31 | return false 32 | end 33 | 34 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil) 35 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 36 | @isInSimpleAttribute = true 37 | return false 38 | end 39 | if(name.index("ImplicitRepresentation") != nil) 40 | @currentImplicitParser = GRS_ImplicitGeometryParser.new() 41 | @isInImplicitGeometry = true 42 | return false 43 | end 44 | return true 45 | end 46 | 47 | def text text 48 | 49 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 50 | @currentImplicitParser.text(text) 51 | return false 52 | end 53 | 54 | if(super(text) == false) 55 | return false 56 | end 57 | 58 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 59 | @currentSimpleAttribute.addValue(text) 60 | return false 61 | end 62 | return true 63 | end 64 | 65 | def tag_end name 66 | 67 | if(name.index("ImplicitRepresentation") != nil) 68 | 69 | implicitGeometry = @currentImplicitParser.geometry 70 | if(implicitGeometry.isreferenceobject == true) 71 | @cityObject.setisImplicitReferenceObject(true) 72 | else 73 | @cityObject.setisImplicitObject(true) 74 | end 75 | @cityObject.addImplicitGeometry(implicitGeometry, name) 76 | @isInImplicitGeometry = false 77 | @currentImplicitParser = nil 78 | return false 79 | end 80 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 81 | @currentImplicitParser.tag_end(name) 82 | return false 83 | end 84 | if(super(name) == false) 85 | return false 86 | end 87 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil) 88 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 89 | @isInSimpleAttribute = false 90 | @currentSimpleAttribute = nil 91 | return false 92 | end 93 | return true 94 | end 95 | end 96 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_generic_city_object_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_parser/geores_geo/grs_implicit_geometry_parser.rb' 5 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 6 | 7 | class GRES_GenericCityObjectParser < CityObjectParser 8 | @currentImplicitParser = nil 9 | @isInImplicitGeometry = false 10 | 11 | def initialize(cityobject,factory) 12 | super(cityobject, factory) 13 | end 14 | 15 | 16 | def tag_start name, attrs 17 | GRES_CGMLDebugger.writedebugstring("GRES_GenericCityObjectParser in tag_start mit " + name + "\n") 18 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 19 | @currentImplicitParser.tag_start(name,attrs) 20 | return false 21 | end 22 | if(name.index("GenericCityObject") != nil) 23 | id = getattrvalue("gml:id", attrs) 24 | if(id != "") 25 | @cityObject.setgmlid(id) 26 | end 27 | return false 28 | end 29 | 30 | if(super(name,attrs) == false) 31 | return false 32 | end 33 | 34 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil) 35 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 36 | @isInSimpleAttribute = true 37 | return false 38 | end 39 | if(name.index("ImplicitRepresentation") != nil) 40 | @currentImplicitParser = GRS_ImplicitGeometryParser.new() 41 | @isInImplicitGeometry = true 42 | return false 43 | end 44 | return true 45 | end 46 | 47 | def text text 48 | 49 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 50 | @currentImplicitParser.text(text) 51 | return false 52 | end 53 | 54 | if(super(text) == false) 55 | return false 56 | end 57 | 58 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 59 | @currentSimpleAttribute.addValue(text) 60 | return false 61 | end 62 | return true 63 | end 64 | 65 | def tag_end name 66 | 67 | if(name.index("ImplicitRepresentation") != nil) 68 | 69 | implicitGeometry = @currentImplicitParser.geometry 70 | if(implicitGeometry.isreferenceobject == true) 71 | @cityObject.setisImplicitReferenceObject(true) 72 | else 73 | @cityObject.setisImplicitObject(true) 74 | end 75 | @cityObject.addImplicitGeometry(implicitGeometry, name) 76 | @isInImplicitGeometry = false 77 | @currentImplicitParser = nil 78 | return false 79 | end 80 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 81 | @currentImplicitParser.tag_end(name) 82 | return false 83 | end 84 | if(super(name) == false) 85 | return false 86 | end 87 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil) 88 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 89 | @isInSimpleAttribute = false 90 | @currentSimpleAttribute = nil 91 | return false 92 | end 93 | return true 94 | end 95 | end 96 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_land_use_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 5 | 6 | class GRES_LandUseParser < CityObjectParser 7 | 8 | 9 | def initialize(cityobject,factory) 10 | super(cityobject, factory) 11 | end 12 | 13 | 14 | def tag_start name, attrs 15 | GRES_CGMLDebugger.writedebugstring("GRES_LandUseParser in tag_start mit " + name + "\n") 16 | 17 | if(name.index("LandUse") != nil) 18 | id = getattrvalue("gml:id", attrs) 19 | if(id != "") 20 | @cityObject.setgmlid(id) 21 | end 22 | return false 23 | end 24 | 25 | if(super(name,attrs) == false) 26 | return false 27 | end 28 | 29 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil) 30 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 31 | @isInSimpleAttribute = true 32 | return false 33 | end 34 | 35 | return true 36 | end 37 | 38 | def text text 39 | 40 | 41 | if(super(text) == false) 42 | return false 43 | end 44 | 45 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 46 | @currentSimpleAttribute.addValue(text) 47 | return false 48 | end 49 | return true 50 | end 51 | 52 | def tag_end name 53 | 54 | if(super(name) == false) 55 | return false 56 | end 57 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil) 58 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 59 | @isInSimpleAttribute = false 60 | @currentSimpleAttribute = nil 61 | return false 62 | end 63 | return true 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_opening_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_parser/geores_geo/grs_implicit_geometry_parser.rb' 5 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 6 | 7 | class GRES_OpeningParser < CityObjectParser 8 | @currentImplicitParser = nil 9 | @isInImplicitGeometry = false 10 | 11 | def initialize(cityobject,factory) 12 | super(cityobject, factory) 13 | end 14 | 15 | def tag_start name, attrs 16 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 17 | @currentImplicitParser.tag_start(name,attrs) 18 | return false 19 | end 20 | if(name.index("Door") != nil or name.index("Window") != nil) 21 | @cityObject.setopeningtype(name) 22 | return false 23 | end 24 | if(super(name,attrs) == false) 25 | return false 26 | end 27 | 28 | if(name.index("ImplicitRepresentation") != nil) 29 | @currentImplicitParser = GRS_ImplicitGeometryParser.new() 30 | @isInImplicitGeometry = true 31 | return false 32 | end 33 | return true 34 | end 35 | 36 | 37 | def text text 38 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 39 | @currentImplicitParser.text(text) 40 | return false 41 | end 42 | 43 | if(super(text) == false) 44 | return false 45 | end 46 | return true 47 | end 48 | 49 | def tag_end name 50 | 51 | if(name.index("ImplicitRepresentation") != nil) 52 | @cityObject.addImplicitGeometry(@currentImplicitParser.geometry,name) 53 | @isInImplicitGeometry = false 54 | @currentImplicitParser = nil 55 | return false 56 | end 57 | if(@isInImplicitGeometry == true and @currentImplicitParser != nil) 58 | @currentImplicitParser.tag_end(name) 59 | return false 60 | end 61 | if(super(name) == false) 62 | return false 63 | end 64 | return true 65 | end 66 | 67 | end 68 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_plant_cover_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_parser/geores_geo/grs_implicit_geometry_parser.rb' 5 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 6 | 7 | class GRES_PlantCoverParser < CityObjectParser 8 | 9 | 10 | def initialize(cityobject,factory) 11 | super(cityobject, factory) 12 | end 13 | 14 | 15 | def tag_start name, attrs 16 | GRES_CGMLDebugger.writedebugstring("GRES_PlantCoverParser in tag_start mit " + name + "\n") 17 | 18 | if(name.index("PlantCover") != nil) 19 | id = getattrvalue("gml:id", attrs) 20 | if(id != "") 21 | @cityObject.setgmlid(id) 22 | end 23 | return false 24 | end 25 | 26 | if(super(name,attrs) == false) 27 | return false 28 | end 29 | 30 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil or name.index("averageHeight") != nil) 31 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 32 | @isInSimpleAttribute = true 33 | return false 34 | end 35 | 36 | return true 37 | end 38 | 39 | def text text 40 | 41 | 42 | if(super(text) == false) 43 | return false 44 | end 45 | 46 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 47 | @currentSimpleAttribute.addValue(text) 48 | return false 49 | end 50 | return true 51 | end 52 | 53 | def tag_end name 54 | 55 | if(super(name) == false) 56 | return false 57 | end 58 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil or name.index("averageHeight") != nil) 59 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 60 | @isInSimpleAttribute = false 61 | @currentSimpleAttribute = nil 62 | return false 63 | end 64 | return true 65 | end 66 | end 67 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_traffic_area_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 5 | 6 | class GRES_TrafficAreaParser < CityObjectParser 7 | 8 | 9 | 10 | def initialize(cityobject,factory) 11 | super(cityobject, factory) 12 | end 13 | 14 | def tag_start name, attrs 15 | GRES_CGMLDebugger.writedebugstring("GRES_TrafficAreaParser in tag_start mit " + name + "\n") 16 | if(name.index("AuxiliaryTrafficArea") != nil or name.index("TrafficArea") != nil) 17 | @cityObject.setTrafficType(name) 18 | GRES_CGMLDebugger.writedebugstring("GRES_TrafficAreaParser Set TrafficTyoe : " + name + " for " + @cityObject.theinternalname + "\n") 19 | 20 | id = getattrvalue("gml:id", attrs) 21 | if(id != "") 22 | @cityObject.setgmlid(id) 23 | GRES_CGMLDebugger.writedebugstring("GRES_TrafficAreaParser Set GML:ID Type : " + id + " for " + @cityObject.theinternalname + "\n") 24 | end 25 | end 26 | 27 | if(super(name,attrs) == false) 28 | return false 29 | end 30 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil or name.index("surfaceMaterial") != nil) 31 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 32 | @isInSimpleAttribute = true 33 | GRES_CGMLDebugger.writedebugstring("GRES_TrafficAreaParser create a simple Attribute with " + name + "@isInSimpleAttribute = true \n ") 34 | return false 35 | end 36 | 37 | return true 38 | end 39 | 40 | def text text 41 | 42 | if(super(text) == false) 43 | return false 44 | end 45 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 46 | @currentSimpleAttribute.addValue(text) 47 | return false 48 | end 49 | return true 50 | end 51 | 52 | def tag_end name 53 | 54 | if(super(name) == false) 55 | return false 56 | end 57 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil or name.index("surfaceMaterial") != nil) 58 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 59 | @isInSimpleAttribute = false 60 | @currentSimpleAttribute = nil 61 | return false 62 | end 63 | return true 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_tunnel_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | Sketchup::require 'geores_src/geores_parser/geores_featureparser/gres_site_parser.rb' 5 | Sketchup::require 'geores_src/geores_schema/geores_attributes/simple_city_object_attribute.rb' 6 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 7 | 8 | 9 | class GRES_TunnelParser < GRES_SiteParser 10 | def initialize(cityobject,factory) 11 | super(cityobject, factory) 12 | end 13 | 14 | def tag_start name, attrs 15 | GRES_CGMLDebugger.writedebugstring("GRES_TunnelParser in tag_start mit " + name + "\n") 16 | b = super(name, attrs) 17 | if(b == false) 18 | return false 19 | end 20 | 21 | if(name.index("Tunnel") != nil) 22 | id = getattrvalue("gml:id", attrs) 23 | if(id != "") 24 | @cityObject.setgmlid(id) 25 | end 26 | return false 27 | end 28 | return true 29 | end 30 | 31 | def text text 32 | if(super(text) == false) 33 | return false 34 | end 35 | 36 | return true 37 | end 38 | 39 | 40 | 41 | 42 | def tag_end name 43 | 44 | if(super(name) == false) 45 | "Gehe in Tag End von Site " + name 46 | return false 47 | end 48 | 49 | return true 50 | end 51 | 52 | 53 | 54 | end 55 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_water_body_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_parser/geores_featureparser/gres_water_boundary_parser.rb' 5 | Sketchup::require 'geores_src/geores_schema/geores_attributes/simple_city_object_attribute.rb' 6 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 7 | 8 | class GRES_WaterBodyParser < CityObjectParser 9 | 10 | 11 | 12 | def initialize(cityobject,factory) 13 | super(cityobject, factory) 14 | 15 | @currentGRES_BoundaryParser = nil 16 | @isInBoundary = false 17 | 18 | @nextisclassname = false 19 | end 20 | 21 | def tag_start name, attrs 22 | GRES_CGMLDebugger.writedebugstring("GRES_WaterBodyParser in tag_start mit " + name + "\n") 23 | 24 | if(@isInBoundary == true) 25 | if(@nextisclassname == true) 26 | puts "Name is " +name 27 | @currentGRES_BoundaryParser = @factory.getCityObjectParserForName(name); 28 | @nextisclassname = false 29 | end 30 | if(@currentGRES_BoundaryParser != nil) 31 | @currentGRES_BoundaryParser.tag_start(name, attrs) 32 | end 33 | return false 34 | end 35 | puts "try to go in to cityobject tag_start" 36 | b = super(name,attrs) 37 | puts b.to_s 38 | if(b == false) 39 | puts "tag_start of cityobject returned false" 40 | return false 41 | end 42 | puts "tag_start of cityobject returned true" 43 | 44 | 45 | if(name.index("boundedBy") != nil and name.index("gml:") == nil) 46 | puts "found a boundary" 47 | @nextisclassname = true 48 | @isInBoundary = true 49 | return false 50 | end 51 | 52 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil) 53 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 54 | @isInSimpleAttribute = true 55 | return false 56 | end 57 | 58 | 59 | return true 60 | end 61 | 62 | 63 | def text text 64 | GRES_CGMLDebugger.writedebugstring("GRES_WaterBodyParser in text mit " + text + "\n") 65 | 66 | if(@isInBoundary == true and @currentGRES_BoundaryParser != nil) 67 | @currentGRES_BoundaryParser.text(text) 68 | return false 69 | end 70 | 71 | if(super(text) == false) 72 | return false 73 | end 74 | 75 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 76 | @currentSimpleAttribute.addValue(text) 77 | return false 78 | end 79 | 80 | return true 81 | end 82 | 83 | def tag_end name 84 | 85 | 86 | if(name.index("boundedBy") != nil and name.index("gml:") == nil and @currentGRES_BoundaryParser != nil) 87 | puts "fuege dem CityObject eine Boundary hinzu" 88 | @cityObject.addBoundary(@currentGRES_BoundaryParser.cityObject) 89 | @isInBoundary = false 90 | @currentGRES_BoundaryParser = nil 91 | return false 92 | end 93 | if(@isInBoundary == true and @currentGRES_BoundaryParser != nil) 94 | @currentGRES_BoundaryParser.tag_end(name) 95 | return false 96 | end 97 | 98 | if(super(name) == false) 99 | "Gehe in Tag End von CityObject " + name 100 | return false 101 | end 102 | if(name.index("class") != nil or name.index("function") != nil or name.index("usage") != nil) 103 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 104 | @isInSimpleAttribute = false 105 | @currentSimpleAttribute = nil 106 | return false 107 | end 108 | return true 109 | end 110 | end 111 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_featureparser/gres_water_boundary_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/cityobjectparser.rb' 4 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 5 | Sketchup::require 'geores_src/geores_schema/geores_attributes/simple_city_object_attribute.rb' 6 | 7 | class GRES_Water_BoundaryParser < CityObjectParser 8 | 9 | 10 | 11 | def initialize(cityobject,factory) 12 | super(cityobject, factory) 13 | end 14 | 15 | def tag_start name, attrs 16 | 17 | GRES_CGMLDebugger.writedebugstring("WaterGRES_BoundaryParser in tag_start mit " + name + "\n") 18 | 19 | 20 | if(name.index("WaterClosureSurface") != nil or name.index("WaterSurface") != nil or name.index("WaterGroundSurface")) 21 | @cityObject.setboundarytype(name) 22 | id = getattrvalue("gml:id", attrs) 23 | if(id != "") 24 | @cityObject.setgmlid(id) 25 | end 26 | end 27 | 28 | if(super(name,attrs) == false) 29 | return false 30 | end 31 | 32 | if(name.index("waterLevel") != nil) 33 | @currentSimpleAttribute = SimpleCityObjectAttribute.new(name, attrs) 34 | @isInSimpleAttribute = true 35 | return false 36 | end 37 | 38 | 39 | return true 40 | end 41 | 42 | def text text 43 | 44 | if(super(text) == false) 45 | return false 46 | end 47 | if(@isInSimpleAttribute == true and @currentSimpleAttribute != nil) 48 | @currentSimpleAttribute.addValue(text) 49 | return false 50 | end 51 | return true 52 | end 53 | 54 | def tag_end name 55 | 56 | if(super(name) == false) 57 | return false 58 | end 59 | if(name.index("waterLevel") != nil) 60 | @cityObject.addSimpleAttribute(@currentSimpleAttribute) 61 | @isInSimpleAttribute = false 62 | @currentSimpleAttribute = nil 63 | return false 64 | end 65 | return true 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_geo/grs_geoparser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'sketchup.rb' 4 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_linear_ring.rb' 5 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_surface.rb' 6 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 7 | 8 | class GRS_GeoParser 9 | 10 | 11 | @surface = nil 12 | @isInCurrentSurface = false 13 | @currentRing = nil 14 | 15 | def initialize 16 | @geometries = Array.new() 17 | end 18 | 19 | attr_reader :geometries 20 | 21 | def tag_start name, attrs 22 | @currenttag = name 23 | if(name == "gml:surfaceMember") 24 | @surface = GRES_Surface.new() 25 | xlink = getattrvalue("xlink:href", attrs) 26 | @surface.setxlink(xlink.delete("#")) 27 | @isInCurrentSurface = true 28 | return false 29 | end 30 | if(@isInCurrentSurface == true and name == "gml:Polygon") 31 | gmlid = getattrvalue("gml:id", attrs) 32 | @surface.setgmlid(gmlid) 33 | return false 34 | end 35 | 36 | if(@isInCurrentSurface == true and name == "gml:LinearRing") 37 | gmlid = getattrvalue("gml:id", attrs) 38 | puts "initialisiere currentRing" 39 | @currentRing = GRES_LinearRing.new() 40 | @currentRing.setgmlid(gmlid) 41 | return false 42 | end 43 | 44 | return true 45 | end 46 | 47 | def text text 48 | if(@currenttag == "gml:pos" or @currenttag == "gml:posList") 49 | puts "coord posistions are " + text 50 | coords = text.split(" ") 51 | puts "array with posistions are " + coords.to_s 52 | i = 0 53 | while i < coords.length-2 54 | x = coords[i].to_f 55 | y = coords[i+1].to_f 56 | z = coords[i+2].to_f 57 | 58 | po3d = Geom::Point3d.new x,y,z 59 | puts "Punkt " + po3d.to_s 60 | puts "currentRing " + @currentRing.to_s 61 | @currentRing.addPoint(po3d) 62 | i = i+3 63 | end 64 | return false 65 | end 66 | return true 67 | end 68 | 69 | def tag_end name 70 | if(name == "gml:surfaceMember") 71 | if(@surface == nil) 72 | GRES_CGMLDebugger.writedebugstring("Fehler @surface == nil beim parsen\n") 73 | end 74 | @geometries.push(@surface) 75 | puts "ein Polygon gefunden" 76 | @isInCurrentSurface = false 77 | return false 78 | end 79 | if(@isInCurrentSurface == true and name == "gml:exterior") 80 | @surface.addExternalRing(@currentRing) 81 | return false 82 | end 83 | if(@isInCurrentSurface == true and name == "gml:interior") 84 | @surface.addInternalRing(@currentRing) 85 | return false 86 | end 87 | return true 88 | end 89 | 90 | 91 | def getattrvalue(name, array) 92 | array.each{|arr| 93 | if(arr[0] == name) 94 | return arr[1] 95 | end 96 | } 97 | return "" 98 | end 99 | 100 | end 101 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_geo/grs_implicit_geometry_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'sketchup.rb' 4 | Sketchup::require 'geores_src/geores_parser/geores_geo/grs_multi_geometry_parser.rb' 5 | Sketchup::require 'geores_src/geores_parser/geores_geo/grs_implicit_geometry_parser.rb' 6 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_implicitgeometry.rb' 7 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 8 | 9 | class GRS_ImplicitGeometryParser 10 | def initialize 11 | @geometry = GRES_ImplicitGeometry.new() 12 | @GRS_GeoParser = nil 13 | end 14 | 15 | attr_reader :geometry 16 | 17 | def tag_start name, attrs 18 | @currenttagname = name 19 | if(name == "core:relativeGMLGeometry") 20 | xlink = getattrvalue("xlink:href",attrs) 21 | if(xlink == "") 22 | xlink = getattrvalue("xlk:href",attrs) 23 | end 24 | if(xlink != "" ) 25 | @geometry.setxlink(xlink.delete("#")) 26 | end 27 | end 28 | if(name.index("gml:MultiSurface") != nil) 29 | id = getattrvalue("gml:id", attrs) 30 | @geometry.setid(id) 31 | @GRS_GeoParser = GRS_MultiGeometryParser.new() 32 | @isInMultiGeometry = true 33 | end 34 | if(@isInMultiGeometry == true) 35 | @GRS_GeoParser.tag_start(name,attrs) 36 | return 37 | end 38 | end 39 | 40 | def text text 41 | if(@isInMultiGeometry == true) 42 | @GRS_GeoParser.text(text) 43 | return 44 | end 45 | if(@currenttagname == "core:transformationMatrix") 46 | trafoarray = [] 47 | arraytext = text.split(" ") 48 | i = 0 49 | arraytext.each { |a| 50 | trafoarray[i] = a.to_f 51 | i = i+1 52 | } 53 | trafo = Geom::Transformation.new(trafoarray) 54 | @geometry.settransformation(trafo) 55 | return 56 | end 57 | if(@currenttagname == "gml:pos") 58 | coords = text.split(" ") 59 | x = coords[0].to_f 60 | y = coords[1].to_f 61 | z = coords[2].to_f 62 | po = Geom::Point3d.new x,y,z 63 | #trafo = Geom::Transformation.new po 64 | @geometry.settransformationpoint(po) 65 | end 66 | end 67 | 68 | def tag_end name 69 | if(name.index("gml:MultiSurface") != nil) 70 | 71 | @geometry.addGeometries(@GRS_GeoParser.geometries) 72 | @isInMultiGeometry = false 73 | return 74 | end 75 | if(@isInMultiGeometry == true) 76 | @GRS_GeoParser.tag_end(name) 77 | return 78 | end 79 | 80 | end 81 | 82 | def getattrvalue(name, array) 83 | array.each{|arr| 84 | if(arr[0] == name) 85 | return arr[1] 86 | end 87 | } 88 | return "" 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_geo/grs_multi_geometry_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/geores_geo/grs_geoparser.rb' 4 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_multisurfacegeometry.rb' 5 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 6 | 7 | class GRS_MultiGeometryParser < GRS_GeoParser 8 | 9 | def initialize 10 | super() 11 | @multisurface = nil 12 | end 13 | 14 | def tag_start name, attrs 15 | 16 | if(name == "gml:MultiSurface" or name == "gml:CompositeSurface") 17 | puts "bin nun in MultiSurface Parser" 18 | gmlid = getattrvalue("gml:id", attrs) 19 | @multisurface = GRES_MultiSurfaceGeometry.new() 20 | @multisurface.setgmlid(gmlid) 21 | return false 22 | end 23 | return super(name, attrs) 24 | 25 | end 26 | 27 | def text text 28 | return super(text) 29 | end 30 | 31 | def tag_end name 32 | if(name == "gml:MultiSurface" or name == "gml:CompositeSurface") 33 | @multisurface.addGeometries(@geometries) 34 | return false 35 | end 36 | return super(name) 37 | end 38 | 39 | attr_reader :multisurface 40 | end 41 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_geo/grs_solid_geometry_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_parser/geores_geo/grs_geoparser.rb' 4 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_solidgeometry.rb' 5 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 6 | 7 | class SolidGeometryParser < GRS_GeoParser 8 | 9 | def initialize 10 | super() 11 | @solid = nil 12 | end 13 | 14 | def tag_start name, attrs 15 | 16 | if(name == "gml:Solid") 17 | 18 | gmlid = getattrvalue("gml:id", attrs) 19 | GRES_CGMLDebugger.writedebugstring("found gml:solid tag with gml:id" + gmlid.to_s + " init new SolidGeometry Object \n") 20 | @solid = GRES_SolidGeometry.new() 21 | @solid.setgmlid(gmlid) 22 | return false 23 | end 24 | return super(name, attrs) 25 | 26 | end 27 | 28 | def text text 29 | return super(text) 30 | end 31 | 32 | def tag_end name 33 | if(name == "gml:Solid") 34 | GRES_CGMLDebugger.writedebugstring("found gml:solid end tag. add Geometries to Solid \n") 35 | @solid.addGeometries(@geometries) 36 | return false 37 | end 38 | return super(name) 39 | end 40 | 41 | attr_reader :solid 42 | end 43 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_geo/grs_triangulated_surface_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'sketchup.rb' 4 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_linear_ring.rb' 5 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_surface.rb' 6 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 7 | 8 | class GRS_TriangulatedSurfaceParser 9 | @surface = nil 10 | @isInCurrentSurface = false 11 | @currentRing = nil 12 | @gmlid = "" 13 | 14 | def initialize 15 | @geometries = Array.new() 16 | end 17 | 18 | attr_reader :geometries 19 | 20 | def tag_start name, attrs 21 | @currenttag = name 22 | if(name == "gml:Triangle") 23 | @surface = GRES_Surface.new() 24 | gmlid = getattrvalue("gml:id", attrs) 25 | if(gmlid != "") 26 | @surface.setgmlid(gmlid) 27 | end 28 | 29 | 30 | 31 | @isInCurrentSurface = true 32 | return false 33 | end 34 | if(name == "gml:TriangulatedSurface") 35 | @gmlid = getattrvalue("gml:id", attrs) 36 | end 37 | 38 | if(@isInCurrentSurface == true and name == "gml:LinearRing") 39 | @currentRing = GRES_LinearRing.new() 40 | gmlid = getattrvalue("gml:id", attrs) 41 | if(gmlid != "") 42 | @surface.setgmlid(gmlid) 43 | #model = Sketchup.active_model 44 | #TODO model.set_attribute("tinids", gmlid, gmlid) 45 | end 46 | return false 47 | end 48 | 49 | return true 50 | end 51 | 52 | def text text 53 | if(@currenttag == "gml:pos" or @currenttag == "gml:posList") 54 | puts "coord posistions are " + text 55 | coords = text.split(" ") 56 | puts "array with posistions are " + coords.to_s 57 | i = 0 58 | while i < coords.length-2 59 | x = coords[i].to_f 60 | y = coords[i+1].to_f 61 | z = coords[i+2].to_f 62 | 63 | po3d = Geom::Point3d.new x,y,z 64 | puts "Punkt " + po3d.to_s 65 | puts "currentRing " + @currentRing.to_s 66 | @currentRing.addPoint(po3d) 67 | i = i+3 68 | end 69 | return false 70 | end 71 | return true 72 | end 73 | 74 | def tag_end name 75 | if(name == "gml:Triangle") 76 | @surface.setparentgmlid(@gmlid) 77 | @geometries.push(@surface) 78 | puts "ein Polygon gefunden" 79 | @isInCurrentSurface = false 80 | return false 81 | end 82 | if(@isInCurrentSurface == true and name == "gml:exterior") 83 | @surface.addExternalRing(@currentRing) 84 | return false 85 | end 86 | 87 | return true 88 | end 89 | 90 | 91 | def getattrvalue(name, array) 92 | array.each{|arr| 93 | if(arr[0] == name) 94 | return arr[1] 95 | end 96 | } 97 | return "" 98 | end 99 | end 100 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_specific/gres_address_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_attributes/gres_address.rb' 4 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 5 | Sketchup::require 'sketchup.rb' 6 | 7 | class GRES_AddressParser 8 | def initialize 9 | @address = GRES_Address.new() 10 | @currenttag = "" 11 | end 12 | 13 | attr_reader :address 14 | 15 | def tag_start name, attrs 16 | @currenttag = name 17 | end 18 | 19 | def text text 20 | if(@currenttag.index("CountryName") != nil and text != "") 21 | GRES_CGMLDebugger.writedebugstring("found Country " + text + " \n") 22 | @address.setcountry(text) 23 | end 24 | if(@currenttag.index("LocalityName") != nil and text != "") 25 | GRES_CGMLDebugger.writedebugstring("found Town " + text + " \n") 26 | @address.settown(text) 27 | end 28 | if(@currenttag.index("ThoroughfareNumber") != nil and text != "") 29 | GRES_CGMLDebugger.writedebugstring("found Number " + text + " \n") 30 | @address.setstreetnumber(text) 31 | end 32 | if(@currenttag.index("ThoroughfareName") != nil and text != "") 33 | GRES_CGMLDebugger.writedebugstring("found Street Name " + text + " \n") 34 | @address.setstreetname(text) 35 | end 36 | if(@currenttag.index("PostalCodeNumber") != nil and text != "") 37 | GRES_CGMLDebugger.writedebugstring("found postal code " + text + " \n") 38 | @address.setpostalnumber(text) 39 | end 40 | if(@currenttag == "gml:pos") 41 | coords = text.split(" ") 42 | if(coords.length == 2) 43 | x = coords[0].to_f 44 | y = coords[1].to_f 45 | p0 = Geom::Point3d.new x,y,0 46 | @address.addAddressPoint(p0) 47 | GRES_CGMLDebugger.writedebugstring("found address point" + p0.to_s + " \n") 48 | elsif(coords.length == 3) 49 | x = coords[0].to_f 50 | y = coords[1].to_f 51 | z = coords[2].to_f 52 | p0 = Geom::Point3d.new x,y,z 53 | @address.addAddressPoint(p0) 54 | GRES_CGMLDebugger.writedebugstring("found address point" + p0.to_s + " \n") 55 | end 56 | 57 | end 58 | end 59 | 60 | end 61 | -------------------------------------------------------------------------------- /geores_src/geores_parser/geores_specific/gres_external_reference_parser.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_attributes/gres_external_reference.rb' 4 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 5 | 6 | class GRES_ExternalReferenceParser 7 | def initialize 8 | @externalReference = GRES_ExternalReference.new() 9 | @currenttag = "" 10 | end 11 | 12 | def tag_start name, attrs 13 | @currenttag = name 14 | end 15 | 16 | def text text 17 | if(@currenttag.index("informationSystem") != nil and text != "") 18 | GRES_CGMLDebugger.writedebugstring("found informationsystem " + text + "\n") 19 | @externalReference.setinformationsystem(text) 20 | end 21 | if(@currenttag.index("name") != nil and text != "") 22 | GRES_CGMLDebugger.writedebugstring("found name " + text + "\n") 23 | @externalReference.setexternalobjectname(text) 24 | end 25 | if(@currenttag.index("uri") != nil and text != "") 26 | GRES_CGMLDebugger.writedebugstring("found uri " + text + "\n") 27 | text = text.gsub("&", "&") 28 | text = text.gsub("\"", """) 29 | @externalReference.setexternalobjecturi(text) 30 | end 31 | 32 | end 33 | 34 | 35 | 36 | attr_reader :externalReference 37 | end 38 | -------------------------------------------------------------------------------- /geores_src/geores_schema/abstract_all.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | class AbstractAll 5 | def initialize 6 | 7 | end 8 | 9 | def writeToCityGML 10 | return "" 11 | end 12 | 13 | def buildToSKP(parent, entity, dictname,counter) 14 | 15 | end 16 | 17 | def buildFromSKP(entity, dictname) 18 | return nil 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_attributes/gres_address.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/abstract_all.rb' 4 | 5 | class GRES_Address < AbstractAll 6 | def initialize 7 | super() 8 | @country = "" 9 | @town = "" 10 | @street = "" 11 | @streetnumber = "" 12 | @postalnumber = "" 13 | @points = Array.new() 14 | end 15 | 16 | attr_reader :country, :town, :street, :streetnumber ,:postalnumber, :points 17 | 18 | def setcountry c 19 | @country = c 20 | end 21 | def settown t 22 | @town = t 23 | end 24 | def setstreetname s 25 | @street = s 26 | end 27 | def setstreetnumber n 28 | @streetnumber = n 29 | end 30 | 31 | def setpostalnumber pn 32 | @postalnumber = pn 33 | end 34 | 35 | def addAddressPoint p0 36 | @points.push(p0) 37 | end 38 | 39 | def writeToCityGML namespace 40 | retString = "" 41 | retString << "<" + namespace + ":address>\n" 42 | retString << "\n" 43 | retString << "\n" 44 | retString << "\n" 45 | retString << "\n" 46 | retString << "" + @country + "\n" 47 | retString << "\n" 48 | retString << ""+ @town + "\n" 49 | if(@street != "") 50 | retString << "\n" 51 | retString << "" + @streetnumber + "\n" 52 | retString << "" + @street + " \n" 53 | retString << "\n" 54 | end 55 | 56 | if(@postalnumber != "") 57 | retString << "\n" 58 | retString << "" + @postalnumber + "\n" 59 | retString << "\n" 60 | end 61 | retString << "\n" 62 | retString << "\n" 63 | retString << "\n" 64 | retString << "\n" 65 | if(@points.length > 0) 66 | retString << "\n" 67 | retString << "\n" 68 | @points.each { |p| 69 | retString << "\n" 70 | retString << "\n" 71 | retString << "" + p.x.to_f.to_s + " " + p.y.to_f.to_s + " " + p.z.to_f.to_s + "\n" 72 | retString << "\n" 73 | retString << "\n" 74 | } 75 | retString << "\n" 76 | retString << "\n" 77 | end 78 | retString << "\n" 79 | retString << "\n" 80 | return retString 81 | end 82 | 83 | def buildToSKP(parent, entity, dictname, counter) 84 | dictionary = entity.attribute_dictionary(dictname, true) 85 | dname = "Address" + counter.to_s 86 | namespace = "bldg" 87 | if(parent.index("Bridge") != nil) 88 | namespace = "brid" 89 | end 90 | if(parent.index("Tunnel") != nil) 91 | namespace = "tun" 92 | end 93 | 94 | dictionary[dname] = writeToCityGML namespace 95 | end 96 | 97 | def buildFromSKP(entity, dictname) 98 | 99 | end 100 | end 101 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_attributes/gres_external_reference.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/abstract_all.rb' 4 | 5 | class GRES_ExternalReference < AbstractAll 6 | def initialize 7 | super() 8 | @informationSystem = "" 9 | @externalObjectName = "" 10 | @externalObjectUri = "" 11 | end 12 | 13 | def setinformationsystem s 14 | @informationSystem = s 15 | end 16 | 17 | def setexternalobjectname o 18 | @externalObjectName = o 19 | end 20 | 21 | def setexternalobjecturi u 22 | @externalObjectUri = u 23 | end 24 | 25 | attr_reader :informationSystem, :externalObjectName, :externalObjectUri 26 | 27 | def writeToCityGML 28 | retString = "\n" 29 | retString << "" + @informationSystem + "\n" 30 | retString << "\n" 31 | if(@externalObjectName != "") 32 | retString << "" + @externalObjectName + "\n" 33 | end 34 | if(@externalObjectUri != "") 35 | retString << "" + @externalObjectUri + "\n" 36 | end 37 | retString << "\n" 38 | retString << "\n" 39 | 40 | return retString 41 | end 42 | 43 | def buildToSKP(parent, entity, dictname, counter) 44 | dictionary = entity.attribute_dictionary(dictname, true) 45 | dname = "ExternalReference" + counter.to_s 46 | dictionary[dname] = writeToCityGML 47 | 48 | end 49 | 50 | def buildFromSKP(entity, dictname) 51 | 52 | end 53 | 54 | 55 | end 56 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_attributes/gres_generic_city_object_attribute.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/abstract_all.rb' 4 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 5 | 6 | class GRES_GenericCityObjectAttribute < AbstractAll 7 | def initialize name, attrs 8 | super() 9 | @name = name 10 | @attrs = attrs 11 | @value = "" 12 | end 13 | 14 | 15 | def addValue value 16 | @value = value 17 | end 18 | 19 | attr_reader :name, :value, :attrs; 20 | 21 | def writeToCityGML 22 | if(@name.index("gen:") == nil) 23 | @name = "gen:" + @name 24 | end 25 | 26 | retString = "<"+@name 27 | 28 | @attrs.each { |array| 29 | retString << " " + array[0].to_s + "=\"" + array[1].to_s + "\"" 30 | } 31 | retString << ">\n" 32 | retString << ""+ @value + "\n" 33 | retString << "\n" 34 | return retString 35 | end 36 | 37 | def buildToSKP(parent, entity, dictname, counter) 38 | GRES_CGMLDebugger.writedebugstring("try to put attribute " + @name + "in " + dictname + "\n") 39 | dictionary = entity.attribute_dictionary(dictname, true) 40 | dname = "GenericAttribute" + counter.to_s 41 | if(@value == nil) 42 | @value = "" 43 | end 44 | GRES_CGMLDebugger.writedebugstring("Value is " + @value + " Counter is " + counter.to_s + "\n") 45 | cgmlstring = writeToCityGML 46 | GRES_CGMLDebugger.writedebugstring("Output is " + cgmlstring + "\n") 47 | dictionary[dname] = cgmlstring 48 | 49 | 50 | 51 | end 52 | 53 | def buildFromSKP(entity, dictname) 54 | 55 | end 56 | 57 | 58 | end 59 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_attributes/simple_city_object_attribute.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/abstract_all.rb' 4 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 5 | 6 | class SimpleCityObjectAttribute < AbstractAll 7 | 8 | 9 | def initialize name, attrs 10 | super() 11 | @name = name 12 | @attrs = attrs 13 | @value = "" 14 | end 15 | 16 | 17 | def addValue value 18 | @value = value 19 | end 20 | 21 | attr_reader :name, :value, :attrs; 22 | 23 | def writeToCityGML 24 | 25 | retString = "<"+@name 26 | 27 | @attrs.each { |array| 28 | retString << " " + array[0].to_s + "=\"" + array[1].to_s + "\"" 29 | } 30 | retString << ">"+ @value + "\n" 31 | return retString 32 | end 33 | 34 | def buildToSKP(parent, entity, dictname, counter) 35 | GRES_CGMLDebugger.writedebugstring("try to put attribute " + @name + "in " + dictname + "\n") 36 | dictionary = entity.attribute_dictionary(dictname, true) 37 | if(@value == nil) 38 | @value = "" 39 | end 40 | dname = @name + counter.to_s 41 | dictionary[dname] = writeToCityGML 42 | 43 | 44 | end 45 | 46 | def buildFromSKP(entity, dictname) 47 | 48 | end 49 | 50 | 51 | 52 | end 53 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_feature/gres_land_use.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_feature/gres_cityobject.rb' 4 | 5 | class GRES_LandUse < GRES_CityObject 6 | def initialize 7 | super() 8 | end 9 | 10 | def buildgeometries(entities, appearances, citygmlloader, parentnames) 11 | parents = Array.new() 12 | if(parentnames != nil) 13 | parents.concat(parentnames) 14 | end 15 | parents.push(@theinternalname) 16 | 17 | 18 | layer_creator = citygmlloader.layercreator 19 | 20 | if(@lod1MultiSurface.length > 0) 21 | group = entities.add_group 22 | group.name = @theinternalname + ".@lod1MultiSurface" 23 | buildlod1multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod1layer) 24 | transform = Geom::Transformation.scaling 39.370078740157477 25 | group.transformation = transform 26 | end 27 | if(@lod2MultiSurface.length > 0) 28 | group = entities.add_group 29 | group.name = @theinternalname + ".@lod2MultiSurface" 30 | buildlod2multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod2layer) 31 | transform = Geom::Transformation.scaling 39.370078740157477 32 | group.transformation = transform 33 | end 34 | if(@lod3MultiSurface.length > 0) 35 | group = entities.add_group 36 | group.name = @theinternalname + ".@lod3MultiSurface" 37 | buildlod3multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod3layer) 38 | transform = Geom::Transformation.scaling 39.370078740157477 39 | group.transformation = transform 40 | end 41 | if(@lod4MultiSurface.length > 0) 42 | group = entities.add_group 43 | group.name = @theinternalname + ".@lod4MultiSurface" 44 | buildlod4multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod4layer) 45 | transform = Geom::Transformation.scaling 39.370078740157477 46 | group.transformation = transform 47 | end 48 | 49 | end 50 | 51 | def writeToCityGML isWFST, namespace 52 | 53 | retstring = "" 54 | 55 | 56 | retstring << "\n" 57 | retstring << "\n" 58 | 59 | @simpleCityObjectAttributes.each { |att| 60 | 61 | retstring << att.value 62 | } 63 | if(@lod1MultiSurface.length > 0) 64 | retstring << "\n" 65 | retstring << "\n" 66 | @lod1MultiSurface.each{ |geo| 67 | retstring << geo.writeToCityGML 68 | } 69 | retstring << "\n" 70 | retstring << "\n" 71 | 72 | end 73 | if(@lod2MultiSurface.length > 0) 74 | retstring << "\n" 75 | retstring << "\n" 76 | @lod2MultiSurface.each{ |geo| 77 | retstring << geo.writeToCityGML 78 | } 79 | retstring << "\n" 80 | retstring << "\n" 81 | 82 | end 83 | if(@lod3MultiSurface.length > 0) 84 | retstring << "\n" 85 | retstring << "\n" 86 | @lod3MultiSurface.each{ |geo| 87 | retstring << geo.writeToCityGML 88 | } 89 | retstring << "\n" 90 | retstring << "\n" 91 | 92 | end 93 | if(@lod4MultiSurface.length > 0) 94 | retstring << "\n" 95 | retstring << "\n" 96 | @lod4MultiSurface.each{ |geo| 97 | retstring << geo.writeToCityGML 98 | } 99 | retstring << "\n" 100 | retstring << "\n" 101 | 102 | end 103 | 104 | 105 | retstring << "\n" 106 | retstring << "\n" 107 | 108 | return retstring 109 | end 110 | 111 | 112 | end 113 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_feature/gres_opening.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_feature/gres_cityobject.rb' 4 | 5 | class GRES_Opening < GRES_CityObject 6 | 7 | def initialize 8 | super() 9 | @implicitgeometries = Array.new() 10 | @type = "" 11 | end 12 | 13 | attr_reader :type 14 | 15 | def addImplicitGeometry i 16 | @implicitgeometries.push(i) 17 | end 18 | 19 | def setopeningtype t 20 | @type 21 | end 22 | 23 | def buildToSKP(parent, entity, dictname, counter) 24 | 25 | super(parent, entity, dictname, counter) 26 | dictionary = entity.attribute_dictionary(dictname, true) 27 | dictionary["type"] = @type 28 | dictionary["parent"] = parent 29 | end 30 | 31 | def buildFromSKP(entity, dictname) 32 | 33 | end 34 | 35 | def writeToCityGML isWFST, namespace 36 | retstring = "" 37 | retstring << "<" + namespace + "opening>\n" 38 | retstring << "<" + namespace + getObjectTypeForInternalName() + " gml:id=\"" + @gmlid + "\">\n" 39 | if(@lod3MultiSurface.length > 0) 40 | retstring << "<" + namespace + "lod3MultiSurface>\n" 41 | retstring << "\n" 42 | @lod3MultiSurface.each{ |geo| 43 | retstring << geo.writeToCityGML 44 | } 45 | retstring << "\n" 46 | retstring << "\n" 47 | 48 | end 49 | if(@lod4MultiSurface.length > 0) 50 | retstring << "<" + namespace + "lod4MultiSurface>\n" 51 | retstring << "\n" 52 | @lod4MultiSurface.each{ |geo| 53 | retstring << geo.writeToCityGML 54 | } 55 | retstring << "\n" 56 | retstring << "\n" 57 | 58 | end 59 | 60 | retstring << "\n" 61 | retstring << "\n" 62 | 63 | end 64 | 65 | 66 | def buildlod3multisurfacegeometry group, appearances, citygmlloader, parentnames, layer 67 | parents = Array.new() 68 | if(parentnames != nil) 69 | parents.concat(parentnames) 70 | end 71 | parents.push(@theinternalname) 72 | 73 | super(group, appearances, citygmlloader, parents, layer) 74 | 75 | end 76 | 77 | 78 | def buildlod4multisurfacegeometry group, appearances, citygmlloader, parentnames, layer 79 | 80 | parents = Array.new() 81 | if(parentnames != nil) 82 | parents.concat(parentnames) 83 | end 84 | parents.push(@theinternalname) 85 | 86 | super(group, appearances, citygmlloader, parents, layer) 87 | end 88 | 89 | def getObjectTypeForInternalName() 90 | if(@theinternalname.index("Door") != nil) 91 | return "Door" 92 | end 93 | return "Window" 94 | end 95 | 96 | 97 | end 98 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_feature/gres_plant_cover.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_feature/gres_cityobject.rb' 4 | 5 | class GRES_PlantCover < GRES_CityObject 6 | def initialize 7 | super() 8 | end 9 | 10 | def buildgeometries(entities, appearances, citygmlloader, parentnames) 11 | parents = Array.new() 12 | if(parentnames != nil) 13 | parents.concat(parentnames) 14 | end 15 | parents.push(@theinternalname) 16 | 17 | 18 | layer_creator = citygmlloader.layercreator 19 | 20 | if(@lod1MultiSurface.length > 0) 21 | group = entities.add_group 22 | group.name = @theinternalname + ".@lod1MultiSurface" 23 | buildlod1multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod1layer) 24 | transform = Geom::Transformation.scaling 39.370078740157477 25 | group.transformation = transform 26 | end 27 | if(@lod2MultiSurface.length > 0) 28 | group = entities.add_group 29 | group.name = @theinternalname + ".@lod2MultiSurface" 30 | buildlod2multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod2layer) 31 | transform = Geom::Transformation.scaling 39.370078740157477 32 | group.transformation = transform 33 | end 34 | if(@lod3MultiSurface.length > 0) 35 | group = entities.add_group 36 | group.name = @theinternalname + ".@lod3MultiSurface" 37 | buildlod3multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod3layer) 38 | transform = Geom::Transformation.scaling 39.370078740157477 39 | group.transformation = transform 40 | end 41 | if(@lod4MultiSurface.length > 0) 42 | group = entities.add_group 43 | group.name = @theinternalname + ".@lod4MultiSurface" 44 | buildlod4multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod4layer) 45 | transform = Geom::Transformation.scaling 39.370078740157477 46 | group.transformation = transform 47 | end 48 | 49 | end 50 | 51 | def writeToCityGML isWFST, namespace 52 | 53 | retstring = "" 54 | 55 | 56 | retstring << "\n" 57 | retstring << "\n" 58 | 59 | @simpleCityObjectAttributes.each { |att| 60 | 61 | retstring << att.value 62 | } 63 | if(@lod1MultiSurface.length > 0) 64 | retstring << "\n" 65 | retstring << "\n" 66 | @lod1MultiSurface.each{ |geo| 67 | retstring << geo.writeToCityGML 68 | } 69 | retstring << "\n" 70 | retstring << "\n" 71 | 72 | end 73 | if(@lod2MultiSurface.length > 0) 74 | retstring << "\n" 75 | retstring << "\n" 76 | @lod2MultiSurface.each{ |geo| 77 | retstring << geo.writeToCityGML 78 | } 79 | retstring << "\n" 80 | retstring << "\n" 81 | 82 | end 83 | if(@lod3MultiSurface.length > 0) 84 | retstring << "\n" 85 | retstring << "\n" 86 | @lod3MultiSurface.each{ |geo| 87 | retstring << geo.writeToCityGML 88 | } 89 | retstring << "\n" 90 | retstring << "\n" 91 | 92 | end 93 | if(@lod4MultiSurface.length > 0) 94 | retstring << "\n" 95 | retstring << "\n" 96 | @lod4MultiSurface.each{ |geo| 97 | retstring << geo.writeToCityGML 98 | } 99 | retstring << "\n" 100 | retstring << "\n" 101 | 102 | end 103 | 104 | 105 | retstring << "\n" 106 | retstring << "\n" 107 | 108 | return retstring 109 | end 110 | end 111 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_feature/gres_relief_feature.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_feature/gres_cityobject.rb' 4 | 5 | class GRES_ReliefFeature < GRES_CityObject 6 | def initialize 7 | super() 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_feature/gres_site.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_feature/gres_cityobject.rb' 4 | Sketchup::require 'sketchup.rb' 5 | Sketchup::require 'geores_src/geores_debug/gres_cgmldebugger.rb' 6 | Sketchup::require 'geores_src/geores_parser/layer_creator.rb' 7 | 8 | class GRES_Site < GRES_CityObject 9 | 10 | 11 | 12 | def initialize 13 | super() 14 | @boundaries = Hash.new() 15 | @installations = Hash.new() 16 | @parts = Hash.new() 17 | end 18 | 19 | def addPart p 20 | @parts[p.theinternalname] = p 21 | end 22 | 23 | def addInstallation i 24 | @installations[i.theinternalname] = i 25 | end 26 | 27 | def addBoundary b 28 | @boundaries[b.theinternalname] = b 29 | end 30 | 31 | def buildToSKP(parent, entity, dictname, counter) 32 | GRES_CGMLDebugger.writedebugstring("in buildToSKP Site\n") 33 | super(parent, entity, dictname, counter) 34 | GRES_CGMLDebugger.writedebugstring("ended buildToSKP of Super Class\n") 35 | if(dictname == nil) 36 | GRES_CGMLDebugger.writedebugstring("Fehler dictname String ist nil \n") 37 | end 38 | GRES_CGMLDebugger.writedebugstring("Current dictionary name is " + dictname + "\n") 39 | dictionary = entity.attribute_dictionary(dictname, true) 40 | parentname = @theinternalname 41 | if(@theinternalname == nil) 42 | GRES_CGMLDebugger.writedebugstring("Fehler @internalname String ist nil\n") 43 | end 44 | GRES_CGMLDebugger.writedebugstring("parentname is " + parentname + "\n") 45 | if(parent == nil) 46 | GRES_CGMLDebugger.writedebugstring("Fehler parent String ist nil \n") 47 | end 48 | if(parent != "") 49 | GRES_CGMLDebugger.writedebugstring("Fuege parent " + parent + " dem Element " + @theinternalname + " hinzu\n") 50 | dictionary["parent"] = parent 51 | parentname = parent + "." + @theinternalname 52 | end 53 | @boundaries.each_value { |boundary| 54 | puts "try to build Boundary Surface" 55 | boundary.buildToSKP(parentname, entity, boundary.theinternalname, counter) 56 | counter = counter +1 57 | } 58 | @installations.each_value { |installation| 59 | installation.buildToSKP(parentname, entity, installation.theinternalname, counter) 60 | counter = counter +1 61 | } 62 | @parts.each_value { |part| 63 | part.buildToSKP(parentname, entity, part.theinternalname, counter) 64 | counter = counter +1 65 | } 66 | if(parent != "") 67 | dictionary["parent"] = parent 68 | end 69 | #@genericAttributes.each { |att| 70 | # dname = "GenericCityObjectAttribute"+ counter.to_s 71 | # att.buildToSKP(@name, entity, dname) 72 | # counter = counter +1 73 | #} 74 | # @simpleCityObjectAttributes.each { |att| 75 | # dname = "SimpleCityObjectAttribute"+ counter.to_s 76 | # att.buildToSKP(@name, entity, dname) 77 | # counter = counter +1 78 | # } 79 | 80 | end 81 | 82 | def buildFromSKP(entity, dictname) 83 | 84 | end 85 | 86 | def buildgeometries(entities, appearances, citygmlloader, parentnames) 87 | parents = Array.new() 88 | if(parentnames != nil) 89 | parents.concat(parentnames) 90 | end 91 | parents.push(@theinternalname) 92 | layer_creator = citygmlloader.layercreator 93 | if(@lod1Solid.length > 0) 94 | group = entities.add_group 95 | group.name = @theinternalname + ".lod1Solid" 96 | buildlod1solidgeometry(group, appearances, citygmlloader, parents, layer_creator.lod1layer) 97 | transform = Geom::Transformation.scaling 39.370078740157477 98 | group.transformation = transform 99 | end 100 | if(@lod1MultiSurface.length > 0) 101 | group = entities.add_group 102 | group.name = @theinternalname + ".@lod1MultiSurface" 103 | buildlod1multisurfacegeometry(group, appearances, citygmlloader, parents, layer_creator.lod1layer) 104 | transform = Geom::Transformation.scaling 39.370078740157477 105 | group.transformation = transform 106 | end 107 | 108 | @parts.each_value { |part| 109 | part.buildgeometries(entities, appearances, citygmlloader, parents) 110 | } 111 | 112 | 113 | end 114 | 115 | attr_reader :boundaries, :installations, :parts 116 | end 117 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_feature/gres_traffic_area.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_feature/gres_cityobject.rb' 4 | 5 | class GRES_TrafficArea < GRES_CityObject 6 | 7 | 8 | def initialize 9 | super() 10 | @type = "" 11 | end 12 | 13 | def setTrafficType t 14 | @type = t 15 | end 16 | 17 | 18 | attr_reader :type 19 | 20 | def buildToSKP(parent, entity, dictname, counter) 21 | puts "in buildToSKP TrafficArea" 22 | super(parent, entity, dictname, counter) 23 | dictionary = entity.attribute_dictionary(dictname, true) 24 | 25 | dictionary["type"] = @type 26 | dictionary["parent"] = parent 27 | 28 | end 29 | 30 | def buildFromSKP(entity, dictname) 31 | 32 | end 33 | 34 | def buildlod2multisurfacegeometry group, appearances, citygmlloader, parentnames, layer 35 | parents = Array.new() 36 | if(parentnames != nil) 37 | parents.concat(parentnames) 38 | end 39 | parents.push(@theinternalname) 40 | super(group, appearances, citygmlloader, parents, layer) 41 | 42 | 43 | end 44 | 45 | 46 | 47 | def buildlod3multisurfacegeometry group, appearances, citygmlloader, parentnames, layer 48 | 49 | parents = Array.new() 50 | if(parentnames != nil) 51 | parents.concat(parentnames) 52 | end 53 | parents.push(@theinternalname) 54 | 55 | super(group, appearances, citygmlloader, parents, layer) 56 | 57 | end 58 | 59 | 60 | def buildlod4multisurfacegeometry group, appearances, citygmlloader, parentnames, layer 61 | parents = Array.new() 62 | if(parentnames != nil) 63 | parents.concat(parentnames) 64 | end 65 | parents.push(@theinternalname) 66 | 67 | 68 | super(group, appearances, citygmlloader, parents, layer) 69 | end 70 | 71 | def writeToCityGML isWFST, namespace 72 | 73 | retstring = "" 74 | lastString = "" 75 | if(@type.index("AuxiliaryTrafficArea") != nil) 76 | retstring << "\n" 77 | retstring << "\n" 78 | lastString << "\n" 79 | lastString << "\n" 80 | else 81 | retstring << "\n" 82 | retstring << "\n" 83 | lastString << "\n" 84 | lastString << "\n" 85 | end 86 | 87 | @simpleCityObjectAttributes.each { |att| 88 | 89 | retstring << att.value 90 | } 91 | 92 | 93 | if(@lod2MultiSurface.length > 0) 94 | retstring << "\n" 95 | retstring << "\n" 96 | @lod2MultiSurface.each{ |geo| 97 | retstring << geo.writeToCityGML 98 | } 99 | retstring << "\n" 100 | retstring << "\n" 101 | 102 | end 103 | if(@lod3MultiSurface.length > 0) 104 | retstring << "\n" 105 | retstring << "\n" 106 | @lod3MultiSurface.each{ |geo| 107 | retstring << geo.writeToCityGML 108 | } 109 | retstring << "\n" 110 | retstring << "\n" 111 | 112 | end 113 | if(@lod4MultiSurface.length > 0) 114 | retstring << "\n" 115 | retstring << "\n" 116 | @lod4MultiSurface.each{ |geo| 117 | retstring << geo.writeToCityGML 118 | } 119 | retstring << "\n" 120 | retstring << "\n" 121 | 122 | end 123 | 124 | retstring << lastString 125 | return retstring 126 | end 127 | end 128 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_feature/gres_water_boundary.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_feature/gres_cityobject.rb' 4 | 5 | class GRES_WaterBoundary < GRES_CityObject 6 | 7 | 8 | def initialize 9 | super() 10 | @type = "" 11 | end 12 | 13 | def setboundarytype t 14 | @type = t 15 | end 16 | 17 | 18 | attr_reader :type 19 | 20 | def buildToSKP(parent, entity, dictname, counter) 21 | puts "in buildToSKP Boundary" 22 | super(parent, entity, dictname, counter) 23 | dictionary = entity.attribute_dictionary(dictname, true) 24 | dictionary["type"] = @type 25 | dictionary["parent"] = parent 26 | 27 | end 28 | 29 | def buildFromSKP(entity, dictname) 30 | 31 | end 32 | 33 | def buildlod2multisurfacegeometry group, appearances, citygmlloader, parentnames, layer 34 | parents = Array.new() 35 | if(parentnames != nil) 36 | parents.concat(parentnames) 37 | end 38 | parents.push(@theinternalname) 39 | super(group, appearances, citygmlloader, parents, layer) 40 | 41 | end 42 | 43 | 44 | 45 | def buildlod3multisurfacegeometry group, appearances, citygmlloader, parentnames, layer 46 | 47 | parents = Array.new() 48 | if(parentnames != nil) 49 | parents.concat(parentnames) 50 | end 51 | parents.push(@theinternalname) 52 | 53 | super(group, appearances, citygmlloader, parents, layer) 54 | 55 | end 56 | 57 | 58 | def buildlod4multisurfacegeometry group, appearances, citygmlloader, parentnames, layer 59 | parents = Array.new() 60 | if(parentnames != nil) 61 | parents.concat(parentnames) 62 | end 63 | parents.push(@theinternalname) 64 | 65 | 66 | super(group, appearances, citygmlloader, parents, layer) 67 | end 68 | 69 | def writeToCityGML isWFST, namespace 70 | retstring = "" 71 | retstring << "<" + namespace + "boundedBy>\n" 72 | retstring << "<" + namespace + getBoundaryNameForInternalName() + " gml:id=\"" + @gmlid + "\">\n" 73 | 74 | @simpleCityObjectAttributes.each { |att| 75 | 76 | retstring << att.value 77 | } 78 | 79 | if(@lod2MultiSurface.length > 0) 80 | retstring << "<" + namespace + "lod2MultiSurface>\n" 81 | retstring << "\n" 82 | @lod2MultiSurface.each{ |geo| 83 | retstring << geo.writeToCityGML 84 | } 85 | retstring << "\n" 86 | retstring << "\n" 87 | 88 | end 89 | if(@lod3MultiSurface.length > 0) 90 | retstring << "<" + namespace + "lod3MultiSurface>\n" 91 | retstring << "\n" 92 | @lod3MultiSurface.each{ |geo| 93 | retstring << geo.writeToCityGML 94 | } 95 | retstring << "\n" 96 | retstring << "\n" 97 | 98 | end 99 | if(@lod4MultiSurface.length > 0) 100 | retstring << "<" + namespace + "lod4MultiSurface>\n" 101 | retstring << "\n" 102 | @lod4MultiSurface.each{ |geo| 103 | retstring << geo.writeToCityGML 104 | } 105 | retstring << "\n" 106 | retstring << "\n" 107 | 108 | end 109 | 110 | 111 | 112 | bpstring = "" 113 | @openings.each_value {|bp| 114 | bpstring << bp.writeToCityGML(isWFST, namespace) 115 | } 116 | 117 | 118 | retstring << bpstring 119 | 120 | 121 | retstring << "\n" 122 | retstring << "\n" 123 | 124 | return retstring 125 | 126 | 127 | 128 | end 129 | end 130 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_geo/gres_geometry_collection.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | class GRES_GeometryCollection 5 | 6 | 7 | 8 | 9 | attr_reader :geometries, :gmlid 10 | 11 | def initialize 12 | @gmlid = "" 13 | @geometries = Array.new() 14 | end 15 | 16 | def setgmlid g 17 | @gmlid = g 18 | end 19 | 20 | def addGeometries geos 21 | @geometries.concat(geos) 22 | end 23 | 24 | 25 | def writeToCityGML 26 | 27 | end 28 | 29 | 30 | end 31 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_geo/gres_implicitgeometry.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | class GRES_ImplicitGeometry 5 | 6 | 7 | def initialize 8 | @geometries = Array.new() 9 | @isreferenceobject = true 10 | @xlink = "" 11 | @parent = "" 12 | @compInst = nil 13 | @gmlid = "" 14 | end 15 | 16 | def setxlink xlink 17 | @xlink = xlink 18 | @isreferenceobject = false 19 | end 20 | 21 | def settransformation trafo 22 | @trafo = trafo 23 | end 24 | 25 | def settransformationpoint point 26 | @trafopoint = point 27 | end 28 | 29 | def addGeometries g 30 | @geometries.concat(g) 31 | end 32 | 33 | def setcompinstance inst 34 | @compInst = inst 35 | end 36 | 37 | def setid id 38 | @gmlid = id 39 | end 40 | 41 | def setparent p 42 | @parent = p 43 | end 44 | 45 | def addGeometry g 46 | @geometries.push(g) 47 | end 48 | 49 | def writeToCityGML 50 | retstring = "" 51 | retstring << "\n" 52 | 53 | array = @trafo.to_a 54 | retstring << "\n" 55 | retstring << array[0].to_s + " " + array[4].to_s + " " + array[8].to_s + " " + array[12].to_s + "\n" 56 | retstring << array[1].to_s + " " + array[5].to_s + " " + array[9].to_s + " " + array[13].to_s + "\n" 57 | retstring << array[2].to_s + " " + array[6].to_s + " " + array[10].to_s + " " + array[14].to_s + "\n" 58 | retstring << array[3].to_s + " " + array[7].to_s + " " + array[11].to_s + " " + array[15].to_s + "\n" 59 | retstring << "\n" 60 | 61 | 62 | if(@isreferenceobject) 63 | retstring << "\n" 64 | retstring << "\n" 65 | @geometries.each { |surf| 66 | 67 | retstring << surf.writeToCityGML 68 | } 69 | retstring << "\n" 70 | retstring << "\n" 71 | 72 | 73 | else 74 | retstring << "\n" 75 | end 76 | retstring << "\n" 77 | retstring << "" 78 | retstring << "" + @trafopoint.x.to_f.to_s + " " + @trafopoint.y.to_f.to_s + " " + @trafopoint.z.to_f.to_s 79 | 80 | retstring << "\n" 81 | retstring << "" 82 | retstring << "\n" 83 | retstring << "\n" 84 | return retstring 85 | 86 | end 87 | 88 | attr_reader :xlink, :trafo, :trafopoint, :geometries, :isreferenceobject, :compInst, :gmlid, :parent 89 | end 90 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_geo/gres_linear_ring.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_point.rb' 4 | 5 | class GRES_LinearRing 6 | 7 | def initialize 8 | @gmlid = "" 9 | @points = Array.new() 10 | @pToExport = Array.new() 11 | end 12 | 13 | def setgmlid g 14 | @gmlid = g 15 | end 16 | 17 | def addPoint p 18 | @points.push(p) 19 | end 20 | 21 | def addPointToExport x,y,z 22 | @pToExport.push(GRES_Point.new(x,y,z)) 23 | end 24 | 25 | def writeToCityGML indexRing 26 | if(indexRing != nil) 27 | retString = "\n" 28 | else 29 | retString = "\n" 30 | end 31 | 32 | retString << "" 33 | counter = 0 34 | lastString = "" 35 | @pToExport.each { |p| 36 | if(counter == 0) 37 | lastString << " " + p.x.to_s + " " + p.y.to_s + " " + p.z.to_s 38 | end 39 | retString << " " + p.x.to_s + " " + p.y.to_s + " " + p.z.to_s 40 | counter = counter + 1 41 | } 42 | retString << lastString 43 | retString << "\n" 44 | retString << "\n" 45 | 46 | return retString 47 | end 48 | 49 | def writeOnlyPointList 50 | retString = "" 51 | counter = 0 52 | lastString = "" 53 | @pToExport.each { |p| 54 | if(counter == 0) 55 | lastString << " " + p.x.to_s + " " + p.y.to_s + " " + p.z.to_s 56 | end 57 | retString << " " + p.x.to_s + " " + p.y.to_s + " " + p.z.to_s 58 | counter = counter + 1 59 | } 60 | retString << lastString 61 | return retString 62 | end 63 | 64 | attr_reader :points, :gmlid, :pToExport 65 | end 66 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_geo/gres_multisurfacegeometry.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_geometry_collection.rb' 4 | 5 | class GRES_MultiSurfaceGeometry < GRES_GeometryCollection 6 | def initialize 7 | super() 8 | end 9 | 10 | def writeToCityGML 11 | retString = "" 12 | retString << "\n" 13 | 14 | @geometries.each { |g| 15 | retString << g.writeToCityGML 16 | } 17 | retString << "\n" 18 | 19 | return retString 20 | end 21 | 22 | def build(group, appearances, citygmlloader, parentnames, lod, layer, isimpl) 23 | @geometries.each { |g| 24 | g.build(group,appearances, citygmlloader, parentnames, @gmlid, lod, layer, isimpl, false) 25 | } 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_geo/gres_point.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | class GRES_Point 5 | def initialize x,y,z 6 | @x = x 7 | @y = y 8 | @z = z 9 | end 10 | 11 | attr_reader :x, :y, :z 12 | end 13 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_geo/gres_solidgeometry.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_geo/gres_geometry_collection.rb' 4 | 5 | class GRES_SolidGeometry < GRES_GeometryCollection 6 | def initialize 7 | super() 8 | end 9 | 10 | def writeToCityGML 11 | retString = "" 12 | retString << "\n" 13 | retString << "\n" 14 | retString << "\n" 15 | 16 | @geometries.each { |g| 17 | retString << g.writeToCityGML 18 | } 19 | retString << "\n" 20 | retString << "\n" 21 | retString << "\n" 22 | 23 | return retString 24 | end 25 | 26 | def build(group, appearances, citygmlloader, parentnames, lod, layer, isimpl) 27 | @geometries.each { |g| 28 | g.build(group,appearances, citygmlloader, parentnames, @gmlid, lod, layer, isimpl, true) 29 | } 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_material/gres_abstract_appearance.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'geores_src/geores_schema/geores_material/gres_target.rb' 4 | 5 | class GRES_AbstractAppearance 6 | def initialize attrs 7 | @attrs = attrs 8 | @targets = Array.new() 9 | @name = "" 10 | @material = nil 11 | @ids = Array.new() 12 | end 13 | 14 | def addtarget target 15 | @targets.push(target) 16 | @ids.push(target.uri) 17 | end 18 | 19 | def setname n 20 | @name = n 21 | end 22 | 23 | def createskpmaterial (filedir, model) 24 | 25 | end 26 | 27 | attr_reader :targets, :name, :material, :ids 28 | end 29 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_material/gres_parameterized_texture.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'sketchup.rb' 4 | Sketchup::require 'geores_src/geores_schema/geores_material/gres_abstract_appearance.rb' 5 | Sketchup::require 'geores_src/geores_schema/geores_material/gres_target.rb' 6 | 7 | 8 | class GRES_ParameterizedTexture < GRES_AbstractAppearance 9 | 10 | def initialize attrs 11 | super(attrs) 12 | #speicherung der Texturkoordinaten und der Referenz zum polygon 13 | @attrs = attrs 14 | end 15 | 16 | def addimageURI (uri) 17 | @imageURI = uri 18 | end 19 | 20 | 21 | def writeToCityGML isWFST 22 | retString = "" 23 | if(isWFST == "true") 24 | retString << "\n" 25 | retString << "\n" 26 | retString << "app:Appearance\n" 27 | retString << "" 28 | else 29 | retString << "\n" 30 | end 31 | 32 | retString << "\n" 33 | retString << "default" 34 | retString << "\n" 35 | retString << "\n" 36 | #if(@name != "") 37 | # retString << "" + @name + "\n" 38 | #end 39 | retString << "" + @imageURI + "\n" 40 | @targets.each { |t| 41 | retString << t.writeToCityGML 42 | 43 | } 44 | retString << "\n" 45 | retString << "\n" 46 | retString << "\n" 47 | if(isWFST == "true") 48 | 49 | retString << "\n" 50 | retString << "\n" 51 | retString << "\n" 52 | else 53 | retString << "\n" 54 | end 55 | 56 | return retString 57 | end 58 | 59 | 60 | 61 | def createskpmaterial (filedir, model) 62 | materials = model.materials 63 | @material = materials.add 64 | texturepath = filedir + @imageURI 65 | @material.texture = texturepath 66 | end 67 | 68 | 69 | attr_reader :imageURI, :coordlists 70 | end 71 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_material/gres_target.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | class GRES_Target 5 | def initialize u 6 | @coordlists = Array.new() 7 | @uri = u 8 | end 9 | 10 | attr_reader :uri, :coordlists 11 | 12 | def writeToCityGML 13 | retString = "" 14 | retString << "\n" 15 | @coordlists.each { |list| 16 | retString << list.writeToCityGML 17 | } 18 | retString << "\n" 19 | end 20 | 21 | def writeToCityGMLX3D 22 | retString = "" 23 | retString << "" 24 | 25 | retString << "#" + @uri 26 | 27 | retString << "\n" 28 | end 29 | 30 | def addcoordlist list 31 | @coordlists.push(list) 32 | end 33 | 34 | 35 | def seturi u 36 | @uri = u 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_material/gres_texcoordlist.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | 4 | class GRES_TexCoordList 5 | def initialize 6 | @coords = Array.new() 7 | @uri = "" 8 | end 9 | 10 | def addcord (c) 11 | @coords.push(c) 12 | end 13 | 14 | def seturi u 15 | @uri = u 16 | end 17 | 18 | attr_reader :coords, :uri 19 | 20 | def writeToCityGML 21 | retString = "" 22 | retString << "\n" 23 | retString << "" 24 | counter = 0 25 | lastString = "" 26 | @coords.each { |c| 27 | if(counter == 0) 28 | lastString = " " + c.x.to_f.to_s + " " +c.y.to_f.to_s 29 | end 30 | retString << " " + c.x.to_f.to_s + " " +c.y.to_f.to_s 31 | counter = counter +1 32 | } 33 | retString << lastString 34 | retString << "\n" 35 | retString << "\n" 36 | 37 | return retString 38 | end 39 | 40 | end 41 | -------------------------------------------------------------------------------- /geores_src/geores_schema/geores_material/gres_x3d_material.rb: -------------------------------------------------------------------------------- 1 | # To change this template, choose Tools | Templates 2 | # and open the template in the editor. 3 | Sketchup::require 'sketchup.rb' 4 | Sketchup::require 'geores_src/geores_schema/geores_material/gres_abstract_appearance.rb' 5 | 6 | 7 | class GRES_X3DMaterial < GRES_AbstractAppearance 8 | 9 | def initialize attrs 10 | super(attrs) 11 | @alpha = 1 12 | end 13 | 14 | attr_reader :color, :alpha 15 | 16 | def setColor (r,g,b) 17 | @color = Sketchup::Color.new r.to_f, g.to_f, b.to_f 18 | @name = "CGML_Material " + @color.to_s 19 | end 20 | 21 | def setColorNew(col) 22 | @color = col 23 | @name = "CGML_Material " + @color.to_s 24 | end 25 | 26 | def settransparancy(a) 27 | @alpha = a 28 | end 29 | 30 | def writeToCityGML isWFST 31 | retString = "" 32 | if(isWFST == "true") 33 | retString << "\n" 34 | retString << "\n" 35 | retString << "app:Appearance\n" 36 | retString << "" 37 | else 38 | retString << "\n" 39 | end 40 | 41 | retString << "\n" 42 | retString << "default" 43 | retString << "\n" 44 | retString << "\n" 45 | # if(@name != "") 46 | # retString << "" + @name + "\n" 47 | #end 48 | red = @color.red.to_f / 256.0 49 | green = @color.green.to_f / 256.0 50 | blue = @color.blue.to_f / 256.0 51 | retString << "" + red.to_s + " " + green.to_s + " " + blue.to_s + "\n" 52 | if(@alpha != -1) 53 | alphaWrite = 1 - @alpha 54 | retString << "" + alphaWrite.to_s + "\n" 55 | end 56 | @targets.each { |t| 57 | retString << t.writeToCityGMLX3D + "\n" 58 | 59 | } 60 | retString << "\n" 61 | retString << "\n" 62 | retString << "\n" 63 | if(isWFST == "true") 64 | 65 | retString << "\n" 66 | retString << "\n" 67 | retString << "\n" 68 | else 69 | retString << "\n" 70 | end 71 | 72 | return retString 73 | end 74 | 75 | def createskpmaterial (filedir, model) 76 | materials = model.materials 77 | @material = materials.add 78 | @material.color = @color 79 | @material.alpha = @alpha 80 | 81 | end 82 | 83 | end 84 | -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/aux_traffic_area_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/aux_traffic_area_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/aux_traffic_area_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/aux_traffic_area_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_closure_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_closure_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_closure_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_closure_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_construction_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_construction_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_construction_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_construction_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_door_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_door_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_door_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_door_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_ground_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_ground_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_ground_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_ground_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_installation_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_installation_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_installation_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_installation_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_outerceiling_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_outerceiling_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_outerceiling_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_outerceiling_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_outerfloor_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_outerfloor_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_outerfloor_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_outerfloor_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_part_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_part_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_part_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_part_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_roof_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_roof_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_roof_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_roof_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_roof_no_solid_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_roof_no_solid_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_roof_no_solid_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_roof_no_solid_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_wall_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_wall_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_wall_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_wall_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_window_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_window_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/bridge_window_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/bridge_window_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_bpart16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_bpart16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_bpart24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_bpart24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_buiInst16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_buiInst16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_buiInst24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_buiInst24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_closure16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_closure16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_closure24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_closure24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_door16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_door16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_door24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_door24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_ground16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_ground16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_ground24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_ground24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_outerceiling16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_outerceiling16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_outerceiling24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_outerceiling24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_outerfloor16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_outerfloor16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_outerfloor24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_outerfloor24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_roof16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_roof16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_roof24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_roof24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_roofNoSolid16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_roofNoSolid16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_roofNoSolid24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_roofNoSolid24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_roofWindow16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_roofWindow16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_roofWindow24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_roofWindow24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_wall16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_wall16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_wall24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_wall24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_wallWindow16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_wallWindow16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_wallWindow24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_wallWindow24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_window16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_window16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/building_window24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/building_window24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/cityfurniture_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/cityfurniture_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/cityfurniture_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/cityfurniture_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/cityfurniture_impl_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/cityfurniture_impl_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/cityfurniture_impl_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/cityfurniture_impl_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/generic16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/generic16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/generic24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/generic24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/generic_impl16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/generic_impl16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/generic_impl24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/generic_impl24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/landuse_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/landuse_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/landuse_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/landuse_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/plantcover16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/plantcover16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/plantcover24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/plantcover24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/railway_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/railway_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/railway_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/railway_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/road_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/road_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/road_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/road_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/solitaryVeg_impl_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/solitaryVeg_impl_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/solitaryVeg_impl_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/solitaryVeg_impl_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/solitayrVeg16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/solitayrVeg16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/solitayrVeg24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/solitayrVeg24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/square_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/square_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/square_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/square_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tin16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tin16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tin24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tin24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/track_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/track_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/track_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/track_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/trafficarea_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/trafficarea_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/trafficarea_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/trafficarea_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_closure_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_closure_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_closure_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_closure_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_door_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_door_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_door_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_door_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_ground_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_ground_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_ground_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_ground_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_installation_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_installation_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_installation_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_installation_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_outerceiling_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_outerceiling_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_outerceiling_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_outerceiling_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_outerfloor_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_outerfloor_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_outerfloor_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_outerfloor_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_part_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_part_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_part_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_part_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_roof_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_roof_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_roof_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_roof_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_wall_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_wall_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_wall_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_wall_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_window_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_window_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/tunnel_window_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/tunnel_window_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/water_ground_surface_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/water_ground_surface_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/water_ground_surface_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/water_ground_surface_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/water_surface_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/water_surface_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/water_surface_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/water_surface_24.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/waterbody_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/waterbody_16.png -------------------------------------------------------------------------------- /geores_src/geores_toolbar/geores_Images/waterbody_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeoplexGIS/geores/14276169f4660bfbc16adda0a2a2deb1711b8b95/geores_src/geores_toolbar/geores_Images/waterbody_24.png -------------------------------------------------------------------------------- /geores_tools_extension.rb: -------------------------------------------------------------------------------- 1 | Sketchup::require 'sketchup.rb' 2 | Sketchup::require 'extensions.rb' 3 | Sketchup::require 'geores_src/g_r_e_s_context_tools.rb' 4 | 5 | 6 | #Register the Sandbox Tools with SU's extension manager 7 | toolext1 = SketchupExtension.new "GEORES CityGML Import V2", "geores_src/geores_parser/citygml_import_main.rb" 8 | 9 | toolext1.description="Adds a CityGML Importer to Sketchup" 10 | 11 | toolext1.version="3.0.0" 12 | toolext1.creator = "GEORES" 13 | toolext1.copyright = "2017, GEORES" 14 | #test nur CityGML 2.0 15 | #Default on in pro and off in free 16 | Sketchup.register_extension toolext1, true 17 | 18 | wt_extensionk = SketchupExtension.new("GEORES CityGML Edit Dialog V2", "geores_src/geores_gui/gres_editdlg.rb") 19 | 20 | wt_extensionk.description = "GEORES CityGML Objekt Dialog" 21 | wt_extensionk.version = "3.0.0" 22 | wt_extensionk.creator = "GEORES" 23 | wt_extensionk.copyright = "2017, GEORES" 24 | 25 | # Register the extension with Sketchup. 26 | Sketchup.register_extension wt_extensionk, true 27 | 28 | toolbar_ext = SketchupExtension.new("GEORES CityGML Toolbars V2", "geores_src/geores_toolbar/LayerGenerator.rb") 29 | 30 | toolbar_ext.description = "GEORES CityGML Toolbars" 31 | toolbar_ext.version = "3.0.0" 32 | toolbar_ext.creator = "GEORES" 33 | toolbar_ext.copyright = "2017, GEORES" 34 | 35 | # Register the extension with Sketchup. 36 | Sketchup.register_extension toolbar_ext, true 37 | 38 | UI.add_context_menu_handler do |menu| 39 | 40 | menu.add_item("GEORES CityGML Kopiere LoD") { 41 | tools = GRES_ContextTools.new() 42 | tools.copylod() 43 | } 44 | menu.add_item("GEORES CityGML Info") { 45 | tools = GRES_ContextTools.new() 46 | tools.info() 47 | } 48 | menu.add_item("GEORES CityGML Manuell zuweisen") { 49 | tools = GRES_ContextTools.new() 50 | tools.manual() 51 | } 52 | 53 | 54 | end 55 | 56 | 57 | wt_exp_extension = SketchupExtension.new("GEORES CityGML Export V2", "geores_src/geores_export/gres_export_main.rb") 58 | 59 | wt_exp_extension.description = "GEORES CityGML Export" 60 | wt_exp_extension.version = "3.0.0" 61 | wt_exp_extension.creator = "GEORES" 62 | wt_exp_extension.copyright = "2017, GEORES" 63 | 64 | # Register the extension with Sketchup. 65 | Sketchup.register_extension wt_exp_extension, true 66 | 67 | 68 | --------------------------------------------------------------------------------