Code Monkey home page Code Monkey logo

Comments (9)

BGR-EGHA avatar BGR-EGHA commented on June 21, 2024

Hey Danny, thank you for opening the issue!
We haven't faced this issue before, but we would love to solve it. To narrow the source of error, could you give us some additional information. First, can you create project and load data from the test dataset: https://github.com/BGR-EGHA/LSAT-TestData? If yes, than probably your environment (e.g. Windows 11 - we have not tested LSAT yet under Windows 11 yet ) is not the source of error.
As a next step, could you specify the following information about the raster dataset you use (maybe using gdal info):

  1. Size (rows and cols)
  2. Spatial Reference
  3. Cell size x and y
  4. If you use a dataset accessible from open repositories could you provide a link for download?
  5. Can you load the raster dataset in any other GIS e.g., ArcGIS or QGIS?
    
  6. If you run the software from the source, do you use the windows powershell to start the software or any other editor (IDLE,
    PyCharm, Notepad++, etc.). If you have not used the powershell yet, please try to do so because there is a better chance of getting an error message that would make things much easier.

Best regards,

Jewgenij

from lsat.

dbaldig avatar dbaldig commented on June 21, 2024

Hey Jewgenij, thanks a lot for your quick response!
Sorry, I'm new to coding and just realized that the PowerShell was actually returning information.
There was an "ImportError: numpy.core.multiarray failed to import" but "pip install numpy==1.22" solved it for now.

Thanks again and have a great day,
Danny

from lsat.

dbaldig avatar dbaldig commented on June 21, 2024

Hey Jewgenij,
have to reopen this issue again as I'm still struggling with the import.
The software still crashes when trying to import the DEM:

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

grafik
Having a look at the raster info, it says that there are no NoData-values, though. I have no issues loading the DEM into QGIS nor ArcGIS and downloaded the data from NASA Earth Data -> it's file "ASTGTMV003_N28E083" if the link doesn't work

from lsat.

BGR-EGHA avatar BGR-EGHA commented on June 21, 2024

Hello Danny,

thanks for the feedback.
We found the bug where a raster without a set NoData Value can crash LSAT and fixed it 9e91fdc. We hope this helps.

Please note that changing the EPSG code of the mask raster during project creation will not reproject that raster. It will simply force LSAT to interpret the raster coordinates as if it has that projection.
At the moment LSAT does not reproject the inital mask raster.
For best results reproject your raster into a projected coordinate system (e.g. UTM 44N) and use that as a mask raster.

Cheers,
Nick

from lsat.

dbaldig avatar dbaldig commented on June 21, 2024

Hey Nick,
Thanks a lot for your help!
Stupid question: So, I just download and run "importData_importRaster.py" in my venv and that updates the program or how do I implement the fix?

Thanks in advance,
Danny

from lsat.

BGR-EGHA avatar BGR-EGHA commented on June 21, 2024

Hi Danny,

yes, you can replace the two files (importData_importRaster.py and ProjectManagement_main.py) either by downloading and replacing them by hand or doing a git pull. Both ways will work if you are running the source version. Not sure about the installer as it has not been updated in some time.

I like to manage my repositories with a git GUI client to simplify the work with the version control system. In my case SmartGit. A list of available clients is available at https://git-scm.com/downloads/guis. GitHub offers their own client for Mac and Windows: https://desktop.github.com/

Keep in mind that even with that fix LSAT expects a projected coordinate system and using a WGS84 mask raster will most likely lead to wrong results.

I hope that helps.
If you encounter any more problems with LSAT let us know.

Cheers,
Nick

from lsat.

dbaldig avatar dbaldig commented on June 21, 2024

Hey Nick,
Thanks a lot for your quick response.
The raster import works now, but I can't import inventory data anymore, although that worked before.
It throws me an "AttributeError: 'NoneType' object has no attribute 'GetGeometryRef'" but there are definitely point features in the layer.

Any idea what went wrong here?

Thanks a lot,
Danny

from lsat.

BGR-EGHA avatar BGR-EGHA commented on June 21, 2024

Hey Danny,

thanks for the feedback.

I just tested the inventory import with the test data set in combination with the new version. It works , as it should because inventory import is handled in other (unchanged) files.

I think I can recreate your error by importing an inventory completly outside of the mask raster and with a different EPSG Code:

Traceback (most recent call last):
  File "D:\LSAT\core\widgets\ImportInventory\importInventory_main.py", line 250, in run
    RandomSampling(self.featPath, self.outTrain, self.outTest, self.percent, self.srp, i="")
  File "D:\LSAT\core\libs\Analysis\Random_Sampling.py", line 48, in __init__
    self.feat = Feature(self.feature_path)
  File "D:\LSAT\core\libs\GDAL_Libs\Layers.py", line 496, in __init__
    self.geometryName = self.getGeometryName()
  File "D:\LSAT\core\libs\GDAL_Libs\Layers.py", line 581, in getGeometryName
    geomRef = feat.GetGeometryRef()
AttributeError: 'NoneType' object has no attribute 'GetGeometryRef'

Can you please verify that the inventory lies atleast partially inside the mask raster and they use the same coordinate reference system? If that is the case please open another issue with the complete Traceback and (if possible) attach your inventory.

Cheers,
Nick

from lsat.

dbaldig avatar dbaldig commented on June 21, 2024

Hey Nick,
you're absolutely right. It was a projection issue and I could fix it. I just worked with the software and it looks like I'm finally capable enough, haha.

Thanks a lot for your support and have a great day,
Danny

from lsat.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.