Forum

Author Topic: Countour lines edges with no data removing  (Read 5310 times)

obw

  • Newbie
  • *
  • Posts: 45
    • View Profile
Countour lines edges with no data removing
« on: July 18, 2017, 11:38:11 AM »
Hello.

I've been generating some posts lately for my project, sorry if this have been posted earlier. Thanks for all Your help!

Is there a way to generate the contour lines without the no-data values, within a polygon or similar? Or worst case to cut the contour lines?

So I have a big Project with 5 chunks and a total of 4-5000 images. The last thing I'm about to create is the contour lines. I've got help from Alexey yesterday that helped me to get good sharp edges to DEMs and Orthomosaics with the shape and Outer line function, but this doesn't help me With the contours.

When I generate contour lines they use the no-data Fields in the edges. This is causing problems in the overlap between chunks because since I've cut the edges of every chunk, Agisoft is estimating the countours (from the DEM) and when I overlap the chunks the results are not good.

So in my model I have cleaned my sparse cloud, my dense cloud, compacted my dense cloud, but still the DEM and contour lines are generated from my original sparse cloud area.

obw

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Countour lines edges with no data removing
« Reply #1 on: July 18, 2017, 12:13:52 PM »
Ok, so I think I found a workaround myself.

- Create DEM interpolation disabled.
- Create contours
- Create New DEM With interpolation (desired result)

This looks like a good approach?

EDIT: The only downside With this is I get no contours where there is holes in the model where I normally have interpolated the DEM... No tricks for this?
« Last Edit: July 18, 2017, 01:09:23 PM by obw »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Countour lines edges with no data removing
« Reply #2 on: July 18, 2017, 03:24:07 PM »
Hello obw,

Currently it is not possible to define the area of the contours generation. As a workaround you can export DEM in desired bounaries, then import it back via Tools Menu -> Import DEM option and then generate the contours.
Best regards,
Alexey Pasumansky,
Agisoft LLC

obw

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Countour lines edges with no data removing
« Reply #3 on: July 18, 2017, 03:28:03 PM »
Thanks again Alexey, that will work :) For future improvements an option to define the area of the contours generation would be great.

obw

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Countour lines edges with no data removing
« Reply #4 on: July 18, 2017, 04:17:42 PM »
One more thing. When exporting contour lines I am presented With two options. Either polylines or polygons. Is there any way to merge theese to not confuse my Client? I'm reconing you need both of them to get all height data? Attached is an example With exported contour lines (Red) and contour polygons (Blue) from Agisoft in a GIS Viewer. Why are theese divided into seperate files?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Countour lines edges with no data removing
« Reply #5 on: July 18, 2017, 04:21:20 PM »
Hello obw,

As far as I know SHP format does not support instances of the different types in the same file (point, polygon, polyline), so when this format is used you are asked to export only certain type of the contours.
Best regards,
Alexey Pasumansky,
Agisoft LLC

obw

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Countour lines edges with no data removing
« Reply #6 on: July 18, 2017, 04:30:04 PM »
Ok thanks, I found this 2 year old post written by Lord Beowolf: http://www.agisoft.com/forum/index.php?topic=4623.msg23369#msg23369.

I would suggest this as a feature update as well, to be able to export one file with all contour information, that is easily importable in any GIS software. As Lord Beowolf stated in his post, arcGIS does not expect an polygon shape file as contour lines, it is expecting polylines to show them corectly, and having two seperate files is even more confusing.

EDIT: Found on wikipedia that "A shapefile must not contain both polyline and polygon data". So I understand that to be able to have this information in the same file another format has to be used.
« Last Edit: July 18, 2017, 04:36:57 PM by obw »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Countour lines edges with no data removing
« Reply #7 on: July 18, 2017, 04:58:05 PM »
Hello obw,

We are considering the possibility of saving polygonal shapes as polylines that have both ends in the same point.
Best regards,
Alexey Pasumansky,
Agisoft LLC

obw

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Countour lines edges with no data removing
« Reply #8 on: July 18, 2017, 05:00:12 PM »
It would have been a very helpful feature to have that option in the export section of contours :)

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Countour lines edges with no data removing
« Reply #9 on: July 24, 2017, 09:49:59 AM »
Hi obw,

As a workaround you could build your DEM from your mesh instead of your dense point cloud. When generating the mesh set the interpolation to DISABLED. Then close the holes in your mesh (TOOLS > MESH > CLOSE HOLES) and build the DEM from it (again, interpolation disabled). Then use this DEM to generate your contour lines.

Alternatively, export your 'standard' DEM as a geotiff, open it with QGIS (free, open-source), crop the DEM to your desired shape and then generate your contour lines from it (RASTER > EXTRACTION > CONTOUR...).

Regards
SAV


obw

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Countour lines edges with no data removing
« Reply #10 on: July 24, 2017, 11:40:34 AM »
Hi.

Thanks for your tip, SAV! tried QGIS and this really gave me the results I was hoping for. It created contour lines in one single export, unlike Agisoft which needs to export two diffrent files. Compared both results in ArcGIS Explorer and the contour lines that are generated is almost identical except that the QGIS export contains both the polylines and polygons.

I actually can't import theese shapes into Agisoft again, I get the "Unnsupported datum" Message. This means that this is a final delivery option only. not being able to work with it in agisoft.
« Last Edit: July 24, 2017, 11:45:12 AM by obw »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Countour lines edges with no data removing
« Reply #11 on: July 24, 2017, 12:13:12 PM »
Hello obw,

 "Unnsupported datum" means that the coordinate system for the imported shapes does not contain the conversion parameters to WGS84. If it is exactly the same system that you have used for the export, you can swap PRJ file related to the imported shapes with the PRJ exported from the active chunk.
Best regards,
Alexey Pasumansky,
Agisoft LLC