Hello,
I have a Python-program to analyse data and I am rewriting it in Julia. The Python version needs over 14 hours, Julia will probably end in under 2 hours.
Now my problem. The result needs to be plotted on a maritime map, S-57 format. In Python I wrote a small library for the maps using GDAL/OGR. Julia has a GDAL package, but the documentation is far too limited for me: I cannot get anything done. Even opening a S-57 file fails in Julia.
Can someone point me to documentation that fits my need, or even help me on my way? I attach a bare minimum file in Python that has my most needed elements.
Thank you for any help.
from osgeo import ogr
def load_objects(infile, name):
loc=[]
dataset = ogr.Open( infile )
try:
objects=dataset.GetLayerByName( name )
except:
return loc
if objects is not None:
feat = objects.GetNextFeature()
while feat is not None:
geom=feat.GetGeometryRef()
if geom.GetGeometryType() == ogr.wkbLineString:
pnt_count = geom.GetPointCount()
for pnt in range(pnt_count):
lat,lon= geom.GetY(pnt), geom.GetX(pnt)
loc.append((lat,lon))
return loc
loc = load_objects(<some S-57 datafile>, "NAVLNE")
print(loc)