Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Longitudinal Profile tool enhancement #9545

Closed
1 of 6 tasks
tdipisa opened this issue Oct 3, 2023 · 2 comments · Fixed by #9872
Closed
1 of 6 tasks

Longitudinal Profile tool enhancement #9545

tdipisa opened this issue Oct 3, 2023 · 2 comments · Fixed by #9872

Comments

@tdipisa
Copy link
Member

tdipisa commented Oct 3, 2023

Description

It is requested to enhance the Longitudinal Profile tool by providing also GeoJson and DXF as export format.

What kind of improvement you want to add? (check one with "x", remove the others)

  • Minor changes to existing features
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Other useful information

Export in GeoJson is not a problem using the WPS output but we should investigate a bit for the DXF one evaluating available JS client solutions like https://www.npmjs.com/package/dxf-writer (or other). The dependency should be lazely loaded.

@MV88
Copy link
Contributor

MV88 commented Oct 31, 2023

@tdipisa can you clarify a few details on what exactly has to exported?

this is a demo image
image

We have access to a set of points containing these info

property value
altitude 1476
slope 0
totalDistanceToThisPoint 0
x -11553493.05632706
y 5532835.989894417

Currently the available formats are referring to the chart line.
What should contain these new exported files?

For the GeoJSON

I assume that it will contain a Feature collection with Point geometries with three coordinates using altitude as third one and a few properties for each Point (slope and totalDistanceToThisPoint).
this will recreate the input line, it can be obvious but I just want to misinterpret the ACs

For the DXF

Should I do the same as for the GeoJSON? i.e recreating the line using this function
https://github.com/tarikjabiri/js-dxf/blob/34608442ed783de547b4224b6f98dee1996f9800/src/Drawing.js#L95
Optionally for the properties we might think of drawing some text near to the point
The DXF will use a Meters units and it will take the point geom already projected in 3857.

UI refactor

I think that we should refactor ta bit the ui because adding two more buttons to export two new formats is not ideal
We could simply add a generic Export button which opens up this UI, without selection of CRS
image

Or we can divide this into two comboboxes one for the PNG/PDF and one for the rest

@tdipisa
Copy link
Member Author

tdipisa commented Nov 2, 2023

@MV88 the export should contains the same of what already present in the CSV output that are tipically coordinates of points in the path along whit the altitude. For the DXF the same, that means geometry data of points.

Let's evaluate better the UI part with @allyoucanmap with the idea to have export formats list configurable.

The new dependency for DXF should be loaded in a lazy way.

@tdipisa tdipisa unassigned MV88 Nov 3, 2023
@tdipisa tdipisa assigned tdipisa and MV88 and unassigned tdipisa Nov 14, 2023
MV88 added a commit to MV88/MapStore2 that referenced this issue Jan 11, 2024
@tdipisa tdipisa added this to the 2024.01.00 milestone Jan 11, 2024
dsuren1 pushed a commit that referenced this issue Jan 16, 2024
* Fix #9545 export dxf and GeoJSON and UI refactor

* fix export in png format
@ElenaGallo ElenaGallo self-assigned this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants