GeoData Workbench
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: GeoData Workbench
I'm not using geodata I'm using trails workbench. I implemented geodata to it and fixed bugs for python 3.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Re: GeoData Workbench
you mean the Geomatic workbench from AddOn manager. Same problem as on GeoDataHakanSeven12 wrote: ↑Sun May 17, 2020 8:13 pm I'm not using geodata I'm using trails workbench. I implemented geodata to it and fixed bugs for python 3.
Code: Select all
I try to read data from cache file ...
C:\Users\BHA\AppData\Roaming\FreeCAD\geodat3/50.340722-11.232647-0.25
no cache file, so I connect to openstreetmap.org...
http://api.openstreetmap.org/api/0.6/map?bbox=11.229140688639552,50.338475818508535,11.236153311360448,50.342968181491464
Traceback (most recent call last):
File "C:\Users\BHA\AppData\Roaming\FreeCAD\Mod\Geomatics\GeoDataWB\import_osm.py", line 128, in import_osm2
f = open(fn, "r")
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\BHA\\AppData\\Roaming\\FreeCAD\\geodat3/50.340722-11.232647-0.25'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\BHA\AppData\Roaming\FreeCAD\Mod\Geomatics\GeoDataWB\import_osm.py", line 695, in downloadData
rc = import_osm2(float(b), float(l), float(s)/10, self.root.ids['progb'], self.root.ids['status'], elevation)
File "C:\Users\BHA\AppData\Roaming\FreeCAD\Mod\Geomatics\GeoDataWB\import_osm.py", line 141, in import_osm2
import requests
ModuleNotFoundError: No module named 'requests'
Code: Select all
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21068 (Git)
Build type: Release
Branch: master
Hash: 92fe9adebbff910c5a10d6230785a6b58935b677
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: GeoData Workbench
No. Geomatics and Trails merged. Here: https://github.com/HakanSeven12/freecad.trails
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Re: GeoData Workbench
Gave GeoData workbench a try on Linux. I had to install some Python packages namely gdal and opencv and OSM import runs like a charm (Python requests was installed on my linux already).
IMHO it seams the question could be reduced to:
Should we add Python requests to Windows version or is there some package in Windows version which could be used instead requests? Or ist it possible to install a Python package on Windows FreeCAD (especially the LibPack 7z dev packages.)
IMHO it seams the question could be reduced to:
Should we add Python requests to Windows version or is there some package in Windows version which could be used instead requests? Or ist it possible to install a Python package on Windows FreeCAD (especially the LibPack 7z dev packages.)
sgrogan wrote: ping
Re: GeoData Workbench
the use of urllib instead of requests would be another option, as urllib is included in FreeCAD LibPack, but it seams this could be some crucial question.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: GeoData Workbench
This should not be a problem.
Another idea is to download the whole osm database or a country and store it into a local database and implement the access to this database?
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: GeoData Workbench
That is exactly what I did. https://github.com/HakanSeven12/freecad ... sm.py#L141
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Re: GeoData Workbench
as many users use windows version which makes it difficault to install python packages it would be cool.microelly2 wrote: ↑Tue May 19, 2020 6:26 pmThis should not be a problem.
Another idea is to download the whole osm database or a country and store it into a local database and implement the access to this database?
The data base idea would be awesome for power users which really use osm download every day (Is there some?). But most useres will not use it ATM IMHO.
BTW the button to show the coordinates in a browser is cool. What would be very useful would be if a link from osm could be copied and just the size of the rectangle would be given. No trail and error with coordinates needed anymore. Furthermore I like the examples. Thus the upload is easy to test.
Re: GeoData Workbench
requests is easy to add as it's pure python https://pypi.org/project/requests/#filesbernd wrote: ↑Tue May 19, 2020 6:06 pm IMHO it seams the question could be reduced to:
Should we add Python requests to Windows version or is there some package in Windows version which could be used instead requests? Or ist it possible to install a Python package on Windows FreeCAD (especially the LibPack 7z dev packages.)
opencv is a little tougher but should be possible as there are wheels available https://pypi.org/project/opencv-python/#files
gdal is the most tricky as it needs to be built from source https://pypi.org/project/GDAL/#description
From the above it looks like some binaries are available but it might take some work to get it to work with FreeCAD's python on Win.
It looks like everything is available on Coonda, so that may even be easier.
Is only requests necessary or the other packages as well?
"fight the good fight"
Re: GeoData Workbench
yes they are all needed, but it seams gdal is only needed for the some special import geodat import AST (gdal) It should be possible to run GeoData without it.
microelly2 should now any better
microelly2 should now any better
microelly2 wrote: ping