Forum

Author Topic: Troubles when exporting contours  (Read 7420 times)

SvaneSDU

  • Newbie
  • *
  • Posts: 48
    • View Profile
Troubles when exporting contours
« on: November 22, 2017, 02:09:42 PM »
Dear all
When exporting shapefiles generated from a DEM, it seems that only the polylines/polygons until a certain altitude is included in the export.
Can anyone help shed light on this problem?

For example I need contours with intervals of 0.25 or 0.5 meters, which are generated inside photoscan (visually if nothing else), but the shapefiles doesn't seem to export correctly.

SvaneSDU

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Troubles when exporting contours
« Reply #1 on: November 22, 2017, 02:21:55 PM »
For me it seems like the exportmodule is somehow broken. It is the same result when using MapInfo or Qgis as the analysis software.

JMR

  • Hero Member
  • *****
  • Posts: 504
    • View Profile
Re: Troubles when exporting contours
« Reply #2 on: November 22, 2017, 02:22:39 PM »
Closed contours are polygons, while open ones are polylines. If you export to shp file, you will not have both in one single file so try to export contours as dxf


SvaneSDU

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Troubles when exporting contours
« Reply #3 on: November 22, 2017, 02:29:03 PM »
I know that, and have exported as both shape-types. The dxf-file can't be opened in mapinfo and is empty in qgis.

SvaneSDU

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Troubles when exporting contours
« Reply #4 on: November 22, 2017, 02:38:06 PM »

JMR

  • Hero Member
  • *****
  • Posts: 504
    • View Profile
Re: Troubles when exporting contours
« Reply #5 on: November 22, 2017, 02:46:10 PM »
Looks weird, indeed. Lets see what Agisoft team can say...

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: Troubles when exporting contours
« Reply #6 on: November 22, 2017, 03:06:28 PM »
Hello SvaneSDU,

Can you provide the shape files (and associated information) that were exported from PhotoScan?
Best regards,
Alexey Pasumansky,
Agisoft LLC


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: Troubles when exporting contours
« Reply #8 on: November 22, 2017, 04:59:56 PM »
Hello SvaneSDU,

Thank you for sharing the data.

I've tried to import both shape files back to PhotoScan, and open them in Q-GIS and GlobalMapper. You can see all three examples below. I do not see any issues with the data - it looks like everything is displayed properly.

Is it possible that there are some layer settings in MapInfo, for example, all polylines are hidden beneath the DEM layer or the polygons have non-transparent fill settings?
Best regards,
Alexey Pasumansky,
Agisoft LLC

SvaneSDU

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Troubles when exporting contours
« Reply #9 on: November 22, 2017, 05:23:40 PM »
Yep, I've checked all settings. It shows perfectly when both polygons AND polylines are shown, but not when either layer is shown by itself. It seems that half the information is in the polyline layer and half is in the polygon layer.

But thank you for your help, I appreciate the effort.

SvaneSDU

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Troubles when exporting contours
« Reply #10 on: November 22, 2017, 05:28:57 PM »
It seems to be the case no matter which program I use (here global mapper):


SvaneSDU

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Troubles when exporting contours
« Reply #11 on: November 22, 2017, 05:47:35 PM »
You can also see it in you own datasets as the polylines are shown in a certain color, and the polygons in another.
So the question is then: Why does chosing one or the other setting in photoscan leave some of the data out?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: Troubles when exporting contours
« Reply #12 on: November 22, 2017, 06:27:25 PM »
Hello SvaneSDU,

SHP format supports only instances of the same type: point, polyline or polygon, so to export all contour lines you need to save separately polygons and polylines, when using SHP format, since both types cannot be present in the same file.

Polygons are true polygons in this case: not polylines that have one vertex for it's start and another for it's end, that have exactly the same coordinates.
Best regards,
Alexey Pasumansky,
Agisoft LLC

SvaneSDU

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Troubles when exporting contours
« Reply #13 on: November 23, 2017, 03:57:52 PM »
Yes I now that (as also described in the linked thread from 2015).
The problem is that if you export as polygons you only get half of the contours when exporting.
When choosing polylines it then exports the other half of the contours instead.

It seems that choosing on or the other will not export all the contour-shapefiles at the same time.

I have asked other people with different gis programs to open the provided files one at a time, and it's the same result:

Polylines represent the lower portion of the contours and polygons the upper.

The workflow (as indicated in the log file) shows that one or the other export type is chosen seperately.

It's a bit strange

Regards Niels


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14927
    • View Profile
Re: Troubles when exporting contours
« Reply #14 on: November 23, 2017, 04:09:12 PM »
Hello Niels,

Actually I do not seem to understand what is the problem.

Generate Contours command in PhotoScan creates polylines and polygons in the same layer - polylines represent the elevation lines with the open edges, usually they are close to the DEM borders. Polygons represent the elevation lines that are closed - like hills, trees and so on.

So when Export Shapes operation is used, even applied to the same layer ("Contours") you need to select Polylines first and then Polygons when using SHP format. So you'll get two separate files that cannot be merged into single SHP file.

If the question is why polygons are related mostly to the higher (or lower) elevation lines than polylines, then it depends on the landscape. If you have in the same area high hill (or stockpile) and deep hole (like quarry), then polygons would be present on both these sites.
Best regards,
Alexey Pasumansky,
Agisoft LLC