Opened 16 years ago

Closed 4 years ago

#1261 closed defect (wontfix)

[Generate contours]Using fixed levels goes wrong

Reported by: meems@… Owned by: warmerdam
Priority: lowest Milestone: closed_because_of_github_migration
Component: default Version: unspecified
Severity: major Keywords:
Cc:

Description (last modified by Jukka Rahkonen)

We use the GDAL library in MapWindow (MW) and we found some inconsistancies with the gdal_contour function.
This function is wrapped in MapWindow in its Utils library and is used as:
u.GenerateContour(sGridFileName, sPolylinesFileName2, dInterval,
oGrid.Header.NodataValue, False, FixedLevels)
When I use this function in my VB6 application some grids create contourlines which are broken into several parts instead of being one long line.

First we tought it was a VB6 problem because when using the same grid and a VB.NET application the problem didn't occured.

But one of the other developers of MW has found out the same happens when using the gdal_contour command line tool.

So it looks like a genuine bug. Could someone look into it?

I've made also a bug report in the bugzilla of MW at:
http://bugs.mapwindow.org/show_bug.cgi?id=251
That report has not only more info but has also some sample data.

I hope someone can fix this.

With regards,
Paul

Change History (9)

comment:1 by meems@…, 16 years ago

Is this bug already scheduled to be fixed?
I'm waiting on it and I really whould like to know what the status is.

With regards.

Paul

comment:2 by warmerdam, 16 years ago

Paul,

I've gone through #251, and grabbed the sample data, but I don't see the
specifics of what commandline arguments you used for gdal_contour?

I'm afraid I don't "schedule" non-customer bug reports.  I process them on a
random basis as time, energy, importance of bug, and simplicity of reproducing
merit.  Extra encouragement (like above) are also helpful in identifying stuff
that is really needed. 

comment:3 by meems@…, 16 years ago

Thanks Frank for your swift response. 
I encountered the bug using your library in VB6 with MapWindow. Rob Cairns has found the same problem using the command line version of gdal_contour.
I've asked him what his setting were. As soon as I have them I'll let you know.

When I use my sample data in VB6 I get the error but when I use the same data in the MapWindow GUI (written in .NET) the problem doesn't occure. So I first thought it was my problem or MapWindows but because Rob got the same error I've posted it here.
If it is a bug of gdal and it can be fixed, my programm is working as it should be. If it's not a bug of gdal or it cannot be fixed I need to rewrite my programm to VB.NET.
As you can see that's is a big decision.

--
Paul

comment:4 by iotc@…, 16 years ago

Hi Frank and Paul

Paul asked me to post the specific command line arguments. Using the sample data rad1E58F.asc downloaded from http://bugs.mapwindow.org/show_bug.cgi?id=251 they are:

gdal_contour -a elev -i 0.05 rad1E58F.asc contour_interval.shp
gdal_contour -a elev -fl 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 rad1E58F.asc contour_fixedlevel.shp 

contour_interval.shp is fine. contour_fixedlevel.shp has the broken contour line at the bottom of the picture as reported.

Regards Rob 


comment:5 by meems@…, 16 years ago

Frank,

Can you reproduce this bug?

If needed I can give you more sample data.

Thanks,
Paul

comment:6 by meems@…, 16 years ago

Frank,

I've been working on it and it seems I found the problem. When I use these fixed levels:
0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 1.5 1.55 1.6 
I get broken lines. When I zoom to the breakpoint and look at the gridvalue at that point the gridvalue equals a fixed level value. In this test I got two broken lines, both where the gridvalue was 1.5.
When I change the fixed levels to 
0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3 1.35 1.4 1.45 1.4999 1.55 1.6 
I don't get broken lines.

For now this looks to be a usable work-around for me, but I need to do some more testing.

I hope this helps you also fixing the problem.

Paul

comment:7 by Jukka Rahkonen, 8 years ago

Description: modified (diff)

This error happens still with GDAL 2.0-dev on Windows 7, 64-bit.

comment:8 by Even Rouault, 7 years ago

Severity: blockermajor

Removing blocker criticality

comment:9 by Even Rouault, 4 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: assignedclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.