Logotip de l'OpenStreetMap OpenStreetMap

Diari de OSMChina

Entrades recents al diari

It’s been over two weeks since the last progress report, and it’s time to update on the current status.

Project Progress

The core modules of the project have now been largely finalized, allowing us to enter the latter stage of development. The upcoming work will mainly involve adding new features within the existing framework.

Render

Firstly, the rendering part has been set up, though there are still some details that need polishment, such as styles and elements controlling the rendering. These will be adjusted in sync with the subsequent feature development to ensure that the styling aligns with the editing logic.

API call and XML obj

I’ve developed an OSM API module that wraps some of OSM’s interfaces using Promises and parses the returned XML into a JavaScript object for easier manipulation within the program.

Editor’s status management

Following that is the editing module, which primarily includes the operation logic and global data management.

For the operation logic in map editing, I’ve introduced a state machine, which manages the current state of the editor by listening to mouse and keyboard events. The state machine, referred to as “stateMachine.js” in the code, handles state transitions and data maintenance based on the functions and state relationships provided in the state diagram. Depending on the current state, it determines which actions to trigger and the new state to transition into. The state machine provides hooks that allow other components, such as mouse events in Pixi.js, to track events. Editing operations are carried out during state transitions.

See full entry

Development has quickly progressed through two weeks, and it’s time to write a bi-weekly report.

Project Progress

The project is still in its early development stage, so we are unable to provide a usable prototype at this time.However, our implementation of the rendering part has been basically determined.

After testing, points and paths can be rendered successfully.

Due to the ongoing development of the interfaces for other modules, some functions have not yet been implemented. For instance, highlighting segments of a path instead of selecting the entire path as in the default logic of the iD editor. Also, the rendering of polygons has not been implemented yet because it requires the interface of the editing module.

We plan to divide the project into different components to facilitate future development and maintenance.

Component and code structure in commits

Demonstration Effect

See full entry

We participated in the OSPP hosted by the Chinese Academy of Sciences, which stands for Open Source Promotion Plan. It is held during the summer every year and encourages students of all grades to contribute to open source projects from July to September. This is very similar to GSoC.

Introduction

OpenStreetMap is a map project initiated in 2004 by Steve Coast of the UK, based on the principle of knowledge openness. Its data model enables mappers to represent and abstract complex real-world structures by utilizing three abstract elements types, for instance, public transportation. Since 2016, the OSM Community has submitted projects related to public transport to GSOC annually. The main work is focused on a JOSM plugin called PT Assistant.

Currently, the project we initiated aims to develop a cross-platform editor utilizing a modern front-end technology stack, which is easy to use with clear interactions.

Why do we need this project?

When editing public transportation relations using iD or JOSM, you may often spend a lot of time on tasks such as selecting each segment from the starting point to the endpoint. You might be surprised to find that even at an intersection where you want to turn, the continuous straight line has not been broken for your selection.

We hope to reduce such energy consumption thing for mapper when editing public transportation by automatically calculating possible bus routes through short-distance navigation after mappers specify the stations along the way. The mapper can then fine-tune it so that it conforms to the actual route taken by buses.

At the same time, we also hope to save time in certain situations, such as when creating a group of bus stops with identical names. There is no need for manual maintenance of multiple bus stop signs composed of relations; they will be automatically matched for you. Or when moving a station sign, parking spots are moved automatically.

See full entry