Skip to content

gmt simplify - avoid loss of aspatial data #213

Closed

Description

@anbj

Using gmt simplify may lead to aspatial data loss. In my case below the ELEV (contour level) attribute is lost.

Extract contours from a dataset. See the aspatial data present in this data.

$ gdal_contour -i 1000 -a ELEV earth_relief15m_cut.grd contours.gmt -f GMT

# @VGMT1.0 @GLINESTRING
# @R-9.125/33.625/57.875/80.875                                           
# @NID|ELEV
# @Tinteger|double
# FEATURE_DATA
>
# @D0|-4000.000
-2.51908396946565 80.875 -4000
-2.51908396946565 80.75 -4000
-2.5 80.7411504424779 -4000
-2.25 80.6331325301205 -4000
-2.0 80.5235294117647 -4000
-1.87459283387622 80.75 -4000
-1.87459283387622 80.875 -4000
>
# @D1|-1000.000
14.8101851851852 80.875 -1000
14.8101851851852 80.75 -1000
15.0 80.7099609375 -1000
15.25 80.6861036639857 -1000
15.5 80.6823694029851 -1000
15.75 80.6968716289105 -1000
16.0 80.7331824062096 -1000
16.0714285714286 80.75 -1000
16.0714285714286 80.875 -1000

Then simplifying with gmt simplify, the aspatial data is lost.

$ gmt simplify -T1k cont.gmt
>
-2.51908396947  80.875  -4000
-2.51908396947  80.75   -4000
-2      80.5235294118   -4000
-1.87459283388  80.875  -4000
>
14.8101851852   80.875  -1000
14.8101851852   80.75   -1000
15      80.7099609375   -1000
15.25   80.686103664    -1000
15.5    80.682369403    -1000
15.75   80.6968716289   -1000
16.0714285714   80.75   -1000
16.0714285714   80.875  -1000

In my opinion, this greatly reduces the usefulness of the tool.

Activity

  1. changed the title [-]gmt simplify[/-] [+]gmt simplify - avoid loss of aspatial data[/+] on Dec 10, 2018
  2. PaulWessel commented on Dec 10, 2018

    @PaulWessel
    Contributor

    Agreed, we need to fix this. Currently at AGU and no time for coding.

  3. anbj commented on Jan 8, 2019

    @anbj
    ContributorAuthor

    In addition to write OGR/GMT header and fields to preserve aspatial data, what about adding an option to gmt simplify to specify min/max length to process? Like gmt spatial -Q][+cmin[/max] option.

  4. stale commented on Feb 7, 2019

    @stale

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

  5. added
    stale
    on Feb 7, 2019
  6. PaulWessel commented on Feb 14, 2019

    @PaulWessel
    Contributor

    Lets keep this one alive.

  7. removed
    stale
    on Feb 14, 2019
  8. stale commented on Mar 16, 2019

    @stale

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

  9. added
    stale
    on Mar 16, 2019
  10. anbj commented on Mar 16, 2019

    @anbj
    ContributorAuthor

    Lets keep this one alive?

  11. removed
    stale
    on Mar 16, 2019
  12. stale commented on Apr 15, 2019

    @stale

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

  13. added
    stale
    on Apr 15, 2019
  14. joa-quim commented on Apr 15, 2019

    @joa-quim
    Member

    This is becoming boring. How do we change the label properties so that the bot does not try to close it?

  15. removed
    stale
    on Apr 15, 2019
  16. PaulWessel commented on Apr 15, 2019

    @PaulWessel
    Contributor

    Could we just have it label the issue STALE but not close it after 7 days?

  17. stale commented on Jan 14, 2020

    @stale

    This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

  18. added
    stale
    on Jan 14, 2020
  19. added
    longterm
    and removed
    stale
    on Jan 14, 2020
  20. added a commit that references this issue on Aug 18, 2021
    b5b6fc6
  21. anbj commented on Feb 15, 2023

    @anbj
    ContributorAuthor

    Too old. Lack of interest. Closing. Will turn up again if it needs to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    longterm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions