Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aot testing #33

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Aot testing #33

wants to merge 10 commits into from

Conversation

jackschonherr
Copy link
Collaborator

No description provided.

AOTTest/AOTTest.csproj Show resolved Hide resolved
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

<Content Include="C:\Users\HEC\Downloads\GDAL\GDAL\bin64\*.dll">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These guys will always fail because we don't have the GDAL Build. We're going to need to set up some system to check if GDAL exists. Check if it's the right GDAL (optionally) , and if we don't, download it. This is a problem FDA has to solve too. We'll solve it together.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tell me more about this file. I'm not familiar with it. Why does it exist?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this folder got added automatically when I checked the "allow native debugging" option in Visual Studio. Breakpoints in my native methods weren't getting hit, so I had to change that option. The JSON in the file contains an entry specifying that native debugging is allowed.

Consequences/Consequences/NSIStreamingProcessor.cs Outdated Show resolved Hide resolved
public class NSI
{
[UnmanagedCallersOnly(EntryPoint = "ReadNSI")]
public static int Read()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not that useful as an external method because the caller can't do anything with the data. Might make more sense to do a "WriteNSItoShapefile" with x and y params to specify the bounding box, and a string file path. for the output file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left this in as a test method and forgot to actually make it useful. For now I'll have a method that just reads from the NSI in case a user just has the Consequences project, and then in GeoConsequences I'll have a method that reads from the NSI and writes to shapefile

_headersWritten = true;
}

using var feature = new Feature(_layer.GetLayerDefn());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invert the naming. Put type on the left whenever possible. Same for the rest of this method.


using var feature = new Feature(_layer.GetLayerDefn());
using var geometry = new Geometry(wkbGeometryType.wkbPoint);
double x = (double)res.Fetch(_xField).ResultValue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know x will be a double? Might want to check for that and throw an exception. Document somewhere up the chain that we demand it to be as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fetch.ResultValue returns an object so if that can't be cast to a double, it should already throw an exception. I'll make a note of that somewhere

}

public void Dispose()
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this guy doing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class has to implement IDisposable, so I had to include this in order to do so. I don't know what the method should do, though

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this guy should be committing any transactions that have not been committed and releasing any pointers to any gdal c objects - so that the memory can be garbage collected and so that the data in its entirety gets flushed to disk.

NativeLib/Class1.cs Outdated Show resolved Hide resolved
NativeLib/NativeLib.csproj Outdated Show resolved Hide resolved
@Brennan1994
Copy link
Contributor

I lied to you about the file conflicts of merging that other pull request. I apologize. Will need to do the merge reconciliation.,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants