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

Points as map features are not visible on project details page #2164

Closed
manjitapandey opened this issue Feb 10, 2025 · 22 comments · Fixed by #2174 or #2225
Closed

Points as map features are not visible on project details page #2164

manjitapandey opened this issue Feb 10, 2025 · 22 comments · Fixed by #2174 or #2225
Assignees
Labels
bug Something isn't working effort:low Likely a few hours frontend Related to frontend code priority:high Should be addressed as a priority

Comments

@manjitapandey
Copy link
Contributor

Describe the bug
when I create a project for MSF Austria demo where most of the features to be surveyed are point features (POIs and amenities). The project can be created but the features are not visible on project details page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'create project'
  2. Create a project using points as map features
  3. Use divide by square as splitting option
  4. Go to project details page
  5. See error

Expected behavior
The features should be visible on project details page

Screenshots

Image

Additional context
Check the behavior on https://dev.fmtm.hotosm.org/project/101

@manjitapandey manjitapandey added bug Something isn't working frontend Related to frontend code labels Feb 10, 2025
@spwoodcock
Copy link
Member

#2154 we have a bit of work to do making FMTM functional for mapping points.

So far we only focused on polygons.

How urgent is this project? 🙏

@manjitapandey
Copy link
Contributor Author

I am not sure on priority. Ivan is providing demo this week where the clients are mostly mapping point features. I will forward you the email.

@spwoodcock
Copy link
Member

Is there any chance you can upload the data here, for easier debugging when we address this?

I think its actually a bug related to the data extract, as I managed to create a point data project previously and at least display the data on the map

@manjitapandey
Copy link
Contributor Author

Task boundary:

Bharatpur task boundary.zip

MSF project point features.zip

@spwoodcock spwoodcock self-assigned this Feb 10, 2025
@spwoodcock
Copy link
Member

It's a frontend issue, as the point are actually there, but don't display on the map (no style probably)

Image

The downloaded data
3_map_features.zip

@spwoodcock spwoodcock added priority:low Backlog of tasks that will be addressed in time testing:ready Ready for testing effort:low Likely a few hours labels Feb 10, 2025
@manjitapandey
Copy link
Contributor Author

@spwoodcock , now all the projects are shown as point features. I just created a project with building map feature downloaded from osm, which i expected to be on polygon format. However, I can see the buildings are in point format.
I don't suppose this is expected behavior.

@manjitapandey manjitapandey reopened this Feb 13, 2025
@manjitapandey manjitapandey added testing:fail Failed testing and removed testing:ready Ready for testing labels Feb 13, 2025
@spwoodcock
Copy link
Member

All projects or just newly created projects are displaying as points?

I will look into it 👍

Should we make a new PATCH release soon after fixing this?

@manjitapandey
Copy link
Contributor Author

manjitapandey commented Feb 13, 2025

This is for newly created projects. Old projects are showing the polygon boundary.
Have we pushed the changes on main or prod too or is it only on dev server?? If only on dev, not big issue but if its on staging or prod, we may need patch release.

@spwoodcock
Copy link
Member

No this isn't on prod, don't worry =)

A hotfix would be to fix prod, while PATCH releases are just in the regular release cycle 😉

@manjitapandey
Copy link
Contributor Author

Yes there are many bug fixes and features that needs to be on prod as well as on Tokha instance too. So we need to decide on patch release soon.

@spwoodcock
Copy link
Member

spwoodcock commented Feb 13, 2025

I just made a project uploading a buildings extract (only polygons) and they display as polygons:

Image

I then created a project extracting data from OSM:

Image

We can see a mix of polygon and point geoms, which is guess I expected - OSM can have both.
(above we have polygons where building=yes, and points where building=yes).

Perhaps the project you were testing with is mostly points on the map, rather than polygons?

@spwoodcock spwoodcock added testing:ready Ready for testing and removed testing:fail Failed testing labels Feb 13, 2025
@spwoodcock
Copy link
Member

spwoodcock commented Feb 13, 2025

I think previously we were creating data extracts but not actually displaying any of the point data!

So we probably have a few projects with some point data in there, but they don't show and were not mapped.

Image

It makes sense to be able to map both right? We create entities in ODK for both geometry types in parallel.

If we allow for mapping mixed geometry types though, this causes a dilemma for the draw geometry functionality as we have it.

Perhaps we need two things:

  • Let the user select which type of geometry type they want to draw (a draw toolbar), then allow them to submit for any type of drawn geometry?
  • During project creation data extract download, give the user checkboxes for point,polygon,linestring, for which type of geometries they wish to extract (e.g. it could be mixed point/polygon, or only polygon)

@spwoodcock
Copy link
Member

I think this issue is fixed though & we can create new issues for the points above 👍

@manjitapandey
Copy link
Contributor Author

Sorry for the confusion, I didn't make it clear earlier maybe. But have you looked at those projects on mapper's page. Though they are visualised as polygon on project details page, they as seen as points on mapper's page.
Its the same behavior for custom uploaded polygons as map features, its shown as polygon on project details page and as points on mapper's page.

@manjitapandey manjitapandey added priority:high Should be addressed as a priority and removed priority:low Backlog of tasks that will be addressed in time labels Feb 14, 2025
@manjitapandey
Copy link
Contributor Author

manjitapandey commented Feb 14, 2025

Clarifying requirement again:

  • If user upload points as map features during project creation: visualise those points on project details page and mapper's page. Remaining workflow similar to those of polygons. - expected 👍
  • If user uploads polygons only as map features : visualise those as polygons on project details page and mapper's page. -Current behavior is polygon is visualised as points on mapper's page - Not expected behavior
  • If user uploads both point and polygon: Visualise them as they are uploaded.

Same will be the behavior for when user fetch map features from osm.
Hope this makes things clear.

SS of project created using polygon as map features:
In project details page:

Image

In mapper's page of Same project

Image

cc; @spwoodcock , @NSUWAL123

@manjitapandey
Copy link
Contributor Author

manjitapandey commented Feb 18, 2025

Hi @spwoodcock , Do you have any update on this issue?
If you are not available maybe @NSUWAL123 can have a look on this. I anticipate this could be a blocker to push changes to staging if not addressed soon so.

@spwoodcock
Copy link
Member

I made a temp fix to default to Polygons for now.

Will be continued in #2220

@manjitapandey
Copy link
Contributor Author

Though temporary fix is made, its still shown as points on mapper frontend for the building features fetched from osm.

@manjitapandey manjitapandey removed the testing:ready Ready for testing label Feb 24, 2025
@spwoodcock
Copy link
Member

spwoodcock commented Feb 24, 2025

Though temporary fix is made, its still shown as points on mapper frontend for the building features fetched from osm.

Sorry I should explain myself better to avoid misunderstandings (I wrote this late last night!)

This is a fix for new projects made.

Any projects that have the wrong config and we want to display as polygons, we simply update the new_geom_type db column for them.

The question is, how urgent is the new release for Tokha? Nothing in this issue is a blocker

@manjitapandey
Copy link
Contributor Author

I just created a new project and the features were points for the building features fetched from osm. I haven't tried by uploding custom map features though.

For tokha, the behavior should be features should be polygon and this is non negotiable and my concern is when we pull whole staging server to tokha, it gonna create mess.

@spwoodcock
Copy link
Member

Does Tokha have all the projects made already, or still needs some new ones?

If they are already made, we just update the db value as mentioned

@NSUWAL123
Copy link
Contributor

Does Tokha have all the projects made already, or still needs some new ones?

If they are already made, we just update the db value as mentioned

There will be around 3-4 projects to be made

spwoodcock added a commit that referenced this issue Feb 25, 2025
… (during proj create) (#2225)

* Revert "fix(backend): set new_geom_type default to Polygon as temp fix for #2164"

This reverts commit 400ed11.

* fix(backend): ignore missing token warning for auth checks

* build: migration to rename xform_category --> osm_category

* refactor(createProject): set primary_geom_type and new_geom_type fields

* build: update to latest osm-fieldwork for change to form_category

* feat(projectCreate): option to specify new_geom_type and primary_geom_type separately

* fix: correctly handle osm data extracts using enum from form type

* Feat/rework proj create cont (#2230)

* [pre-commit.ci] pre-commit autoupdate (#2224)

updates:
- [github.com/commitizen-tools/commitizen: v4.2.1 → v4.2.2](commitizen-tools/commitizen@v4.2.1...v4.2.2)
- [github.com/astral-sh/ruff-pre-commit: v0.9.6 → v0.9.7](astral-sh/ruff-pre-commit@v0.9.6...v0.9.7)
- [github.com/astral-sh/uv-pre-commit: 0.6.0 → 0.6.2](astral-sh/uv-pre-commit@0.6.0...0.6.2)
- [github.com/pycontribs/mirrors-prettier: v3.5.1 → v3.5.2](pycontribs/mirrors-prettier@v3.5.1...v3.5.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* chore(deps): update dependency @types/geojson to v7946.0.16 (#2227)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(dataExtract): if no dataExtract uploaded or fetched, disable next btn

* fix(radiobutton): use radio option label as id for radiobutton

* fix(description): update uploadSurvey desc section hover

* fix(checkbox): update styles

* refactor(style): refactor style to maintain consistent gaps in UI

* fix(selectForm): disappear validation message after form upload

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Co-authored-by: Nishit Suwal <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working effort:low Likely a few hours frontend Related to frontend code priority:high Should be addressed as a priority
Projects
None yet
3 participants