CSV Processing vs Database Processing

Hi,

I am currently trying to run a code in PyCharm to calculate intersections from survey lines and mark intersections as 1 or 0 based on a lower signal or higher altitude. My code runs fine when I've exported the csv manually through Oasis Montaj and detects all the intersections.

However when I've tried to run the script on a database not all the intersections get marked.

image.png

This happens even though the code is working on the same datasets. I think the problem arises when it comes to dealing with NaN values in a csv vs an oasis database, is there a way to deal with that better? 

I have attached the database and the csv code for comparison.

Answers

  • BeckyBodger2
    BeckyBodger2 Posts: 11 mod

    Hi Niveditha,

    What if you created a subset database and excluded the dummies? Then run your intersection code on the subset database?

    Database > Export > Subset GDB

    image.png

    It only removes the dummies on one channel (whatever you set as the Mask Channel) so I guess it depends if the problem is the dummies or NaN values in a single column or across multiple columns?

    I hope that helps!

    Becky

  • Hi Becky,

    Thanks for the reply! I think the issue is wherever there are dummy values it falls over, especially in the X and Y, and I want to keep those in my final database

  • BeckyBodger2
    BeckyBodger2 Posts: 11 mod

    I'll see if one of our developers can have a look at your code… I don't know python!

  • Thank you so much!

    I am also trying to work on just a database, instead of exporting to a csv and importing to the same database in case that's causing issues. I've attached that script too :)