GPS coordinates
- 
 hi, How can I get real world GPS coordinates [latitude, longitude] for multiple components’ origins after I have set the whole model’s global position and orientation? thanks for your time in advance 
- 
 @buildermax said: How can I get real world GPS coordinates [latitude, longitude] for multiple components’ origins after I have set the whole model’s global position and orientation? Type/Copy+Paste puts "Latitude = \t"+Sketchup.active_model.shadow_info["Latitude"].to_s+"\n"+"Longitude = \t"+Sketchup.active_model.shadow_info["Longitude"].to_sinto the Ruby console to get the Model's Lat/Long...
 Note this too...
 latlong=Geom::LatLong.new([Sketchup.active_model.shadow_info["Latitude"],Sketchup.active_model.shadow_info["Longitude"]]) Sketchup.active_model.latlong_to_point(latlong)returns a point based on latlong
 We want the inverse -point_to_latlong(point)
 To find the equivalent latlong of a Group or Instance will be much more complex...
 There has already been some work on this by John WS Hibbs see http://www.swajime.com/ruby/swa.txt [save it asswa.rbfile]
 It returns lat/long of any point, but you will need to tweak the code to get the latlong ofipoint=Geom::Point3d.new(instance.transformation[12],instance.transformation[13],instance.transformation[14])
- 
 I'm moving this thread to the Developer Section. 
Advertisement


 
                             
                             
                             
                             
                             
                             
                            