Closed allanlaal closed 2 years ago
I haven't been looking at that at all, really. I've had a lot of other things distracting me from Trails these last few months and I'm focused on refactoring parts of it that aren't working well.
Implementing this sort of thing would certainly be welcome, but I know I don't really have the time to focus on it now myself.
GIS2BIM is the nearest thing I found for adding WMS support to FreeCAD
I'm working on it currently, Probably next week it will be ready. I discussed with Hakan to add it to the trials workbench. So I will do a PR next week.
Ha! Ok. I had been working on incorporating it myself, but I haven't had a lot of time to devote to it. IT doesn't seem terribly complex, though.
Several people with the same ideas is always good!! Below 2 screenshots of my work so far. One to define lat/lon location and the other to perform the WMS request, test the result and import it as image. Still working on a list with WMS-servers so that users can choose a server from a list. Files are in https://github.com/DutchSailor/FOSS-BIM-Experiments/tree/ac0b5270c4a04af346b5eeaeafb77f4f84b327a0/GIS2BIM
Nice progress 👍
Looks great!
Import WMS update
Geolocation expanded with multiple TMS-layers
Import TMS(Worldwide aerialphoto or map)
It looks amazing. If you are planning to import that feature to Trails, can you share this updates under Trails FreeCAD forum thread?
The PR is merged! You can find the tool under 'Geo Import Tools'
@allanlaal is it possible for you to test it? Just to make sure it's working.
Here we go 🙂 Make an announcement about new features on forum topic and twitter.
I made some import fixes. For windows users, FreeCAD don't have requests package at installation. Maybe you can use urllib or we can ask packager guys to add the request in conda and LP version of FreeCAD.
That's a good point, the dependency on requests is removed now.
It seems need another request fix.
11:20:06 Running the Python command 'Import TMS' failed: Traceback (most recent call last): File "C:\Users\hakan.seven\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\geomatics\geoimport_gui.py", line 172, in Activated import_tms.GIS_TMS_Dialog().exec_() File "C:\Users\hakan.seven\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\geomatics\geoimport\import_tms.py", line 71, in __init__ self.initUI() File "C:\Users\hakan.seven\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\geomatics\geoimport\import_tms.py", line 173, in initUI else: self.test_TMS() File "C:\Users\hakan.seven\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\geomatics\geoimport\import_tms.py", line 190, in test_TMS TMS = GIS2BIM.TMS_WMTSCombinedMapFromLatLonBbox(self.lat,self.lon,self.bboxWidth,self.bboxHeight,int(self.zoomLevel.text()),self.pixels,self.TMS_WMTS,self.ServerName) File "C:\Users\hakan.seven\AppData\Roaming\FreeCAD\Mod\freecad.trails\freecad\trails\geomatics\geoimport\GIS2BIM.py", line 299, in TMS_WMTSCombinedMapFromLatLonBbox TileImages.append(Image.open(requests.get(i, stream=True).raw))
Oops, is resolved in new PR.
Works for my system
OS: Windows 10 Version 2009 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.24291 (Git) Build type: Release Branch: releases/FreeCAD-0-19 Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac Python version: 3.8.6+ Qt version: 5.15.2 Coin version: 4.0.1 OCC version: 7.5.0 Locale: Turkish/Turkey (tr_TR)
Also I moved GIS tools to a seperate toolbar. Its your play ground
I think if there is alredy a GeoOrigin object, your GIS-Sitedata object can use its coordinates. It uses UTM coordinate system and has a zone selector. So you can convert it coordinates to every system you want.
The OpenGIS® Web Map Service Interface Standard (WMS) provides a simple HTTP interface for requesting geo-registered map images from one or more distributed geospatial databases. A WMS request defines the geographic layer(s) and area of interest to be processed. The response to the request is one or more geo-registered map images (returned as JPEG, PNG, etc) that can be displayed in a browser application. The interface also supports the ability to specify whether the returned images should be transparent so that layers from multiple servers can be combined or not.
~ https://www.ogc.org/standards/wms