Forum

Author Topic: Labeled Contours  (Read 7152 times)

FT

  • Newbie
  • *
  • Posts: 9
    • View Profile
Labeled Contours
« on: March 29, 2017, 05:08:52 PM »
Good Day, everyone!

In Version 1.3, is there a way to label contours when exporting as DXF?

Contours without labels are pretty useless...

Thanks!
FT

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15166
    • View Profile
Re: Labeled Contours
« Reply #1 on: March 29, 2017, 06:06:51 PM »
Hello FT,

In the version 1.3.0 the elevation level is written to the corresponding shape attributes, in the next update this information will be automatically assigned to the labels.

The shapes from the exported contours layer contain the information about the elevation also in the proper DXF tags.

As a workarond you can use the following script that will copy the elevation attribute value to the shape label:

Code: [Select]
import PhotoScan
chunk = PhotoScan.app.document.chunk
for s in chunk.shapes:
    if s.group.label == "Contours":
        s.label = s.attributes["ELEVATION"]
Best regards,
Alexey Pasumansky,
Agisoft LLC

FT

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Labeled Contours
« Reply #2 on: April 21, 2017, 04:38:41 PM »
Thanks a lot, Alexey!

I ran a few examples using the script that you suggested. The contour labels are not located along each contour line, as typical and advisable for readability, but they are located at the center of the polygon delimited by the contour line. As a result, in case of nested contour lines, it is pretty much impossible to read the elevations of the contours.

Please let me know if there is an improved script or if a beta version is available that includes labeling.

Thanks and cheers!
Fulvio

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15166
    • View Profile
Re: Labeled Contours
« Reply #3 on: April 21, 2017, 05:18:41 PM »
Hello Fulvo,

In the version 1.3.1 (already released) the labels to the contours are assigned automatically.

But not quite sure about your comment about the label location. All labels are placed directly on the contour line. Maybe there's any smaller contour somewhere in the middle of the area covered by the polygonal shape that you are referring to?

I'm attaching the example of the contours generated in 1.3.1 with the labels:
Best regards,
Alexey Pasumansky,
Agisoft LLC

FT

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Labeled Contours
« Reply #4 on: April 29, 2017, 12:53:28 PM »
Thanks a lot, Alexey

I installed 1.3.1 and noticed a couple of things:
1) Contours "without intersections" failed when in worked fine with 1.3 (same DTM file, same contour interval). Got message 1 in attached file
2) Deselected "without intersections" and 1.3.1 generated contours. However, Photoscan is stuck saving the file after contour generation. After 1 hour it was still 0%. Before generating contours, saving was instantaneous. Retried, same thing see message 2 in attached file
3) When contour lines are exported to dxf, then labels are gigantic and cover the whole drawing, when text is scaled to decent size (e.g., 0.2 m), the labels simply float around and are not along their contour lines, see Items 3 in attached file

Thanks and cheers!
Fulvio

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15166
    • View Profile
Re: Labeled Contours
« Reply #5 on: May 04, 2017, 12:07:44 PM »
Hello Fulvio,

It would be helpful, if you could provide the sample project with DEM (no need of dense cloud and mesh) for testing purposes, so that we could check issues related to 1 and 2 points in your message. Also specify the parameters to be used for the contour generation.
Best regards,
Alexey Pasumansky,
Agisoft LLC

FT

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Labeled Contours
« Reply #6 on: May 09, 2017, 04:02:45 PM »
Good Day, Alexey

Yes, no problem at all!

Please let me know where I can upload the files.

Cheers!
Fulvio

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15166
    • View Profile
Re: Labeled Contours
« Reply #7 on: May 16, 2017, 02:45:24 PM »
Hello Fulvio,

We were able to reproduce the first problem, but not the second one. Can you specify the parameters that we should use to reproduce it? Using 1 meter step we have generated about 1,600 polylines and 158,000 polygons and the project has been saved less then in a minute.
Best regards,
Alexey Pasumansky,
Agisoft LLC

FT

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Labeled Contours
« Reply #8 on: May 16, 2017, 11:19:41 PM »
Hi Alexey

I have uploaded at the ftp site a file with the contour settings, and  a short video on the saving problem.

Thanks and cheers!
Fulvio

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15166
    • View Profile
Re: Labeled Contours
« Reply #9 on: June 02, 2017, 11:11:55 AM »
Hello Fulvio,

We were still unable to reproduce the issue with the project saving:
Code: [Select]
2017-06-02 10:57:22 BuildContours: source data = DEM, min altitude = 620.149, max altitude = 951.066, interval = 1
 Generating contours...
 generating 331 contour levels
 Finished processing in 356.175 sec (exit code 1)
 SaveProject
 Saving project...
 saved project in 69.826 sec
 Finished processing in 69.826 sec (exit code 1)

Even having two layers with the contours generated with the same parameters like you were using, the saving operation was quite fast.
Best regards,
Alexey Pasumansky,
Agisoft LLC