Extract data from MapSys packages.
Project description
MapSys Extractor
MapSys export and inspection tools for working with MapSys projects.
MapSys is a Software solution created by GeoTop SRL in Odorheiul Secuiesc, Romania. The official MapSys GIS functionality enables efficient generation of digital plans and preparation, use and querying of spatial data using specialized functions, with the goal of creating a relational data model loaded with topologically validated information. Such data can be used in MapSys or in any GIS/alfanumeric data management application.
This open-source repository is a small, unaffiliated utility that helps you convert MapSys projects to DXF and explore their data structures. It is not a replacement for the original MapSys application.
As the format of the files is not openly documented, their structure had to be determined by examining the hex dump. The meaning for a lot of fields is still unknown. Always check the output and file an issue if it does not match the input.
What this project does
- It looks for a MapSys "main" project file (usually a file like
*.pr5) in a folder and reads the associated data files found next to it (points, polylines, texts, layers, etc.). - It converts what it finds into a standard DXF drawing that you can open in CAD software (AutoCAD, BricsCAD, DraftSight, free viewers, etc.).
- It also contains building blocks for developers to read MapSys data files.
Install
The steps below are written for beginners. They show how to:
- Install Python
- Create a private “virtual environment”
- Get the project from GitHub
- Install it into your environment and run it
You only need to do this once on your computer. After that, you can just activate the environment and use the tool.
1) Install Python (version 3.11 or newer)
-
Windows:
-
Go to the official Python website:
https://www.python.org/downloads/ -
Download “Python 3.x” for Windows and run the installer.
-
Important: On the first screen, check the box “Add Python to PATH”, then click Install.
-
After install, open PowerShell and type:
python --version
You should see something like
Python 3.11.8(any 3.11+ is fine).
-
-
macOS:
- Visit
https://www.python.org/downloads/and install the latest 3.x for macOS. - Open Terminal and type
python3 --versionto confirm.
- Visit
-
Linux (Ubuntu/Debian):
- Open Terminal and run:
sudo apt update && sudo apt install -y python3 python3-venv python3-pip
- Confirm with:
python3 --version
2) Create a virtual environment (keeps things clean)
Pick a folder where you want to keep this project (for example,
D:\tools\mapsys-extractor on Windows or ~/tools/mapsys-extractor on
macOS/Linux). Then:
-
Windows PowerShell:
python -m venv .venv . .venv\Scripts\Activate.ps1
-
macOS/Linux Terminal:
python3 -m venv .venv source .venv/bin/activate
If activation worked, your prompt will show (.venv) at the start. While this
is active, anything you install stays private to this folder.
3) Get the project from GitHub
If you have Git installed, you can clone the repository. If not, you can click the green “Code” button on GitHub and download the ZIP, then unzip it into your chosen folder.
Using Git (recommended):
git clone https://github.com/pyl1b/mapsys-extractor.git
cd mapsys-extractor
4) Install the tool into your environment
With the virtual environment still active and inside the mapsys-extractor folder,
run:
-
Windows PowerShell:
python -m pip install --upgrade pip python -m pip install -e .
-
macOS/Linux:
python3 -m pip install --upgrade pip python3 -m pip install -e .
This installs the library and the mapsys-extractor command.
5) Try it out
Show the help to confirm it’s installed:
mapsys-ex --help
Later, when you come back to use the tool again, just re-activate the environment (step 2) and you’re ready.
6) Use it
Prepare a folder that contains your MapSys project. Place the "main"
project file (e.g. something.pr5) and its companion files in the same
directory.
Create a dxf file to use as template. This can have stuff in it or be empty;
we use it because the application can be configured to export the MapSys points
as blocks with attributes, in which case this template file should have that
block definition already present. See the help for the to-dxf command
(mapsys to-dxf --help) to get a list of arguments related to block export.
mapsys to-dxf PATH/TO/YOUR/FOLDER \
--dxf-template template.dxf \
--dxf PATH/TO/OUTPUT/your-project.dxf
If everything goes well, a your-project.dxf file will be created in the same
directory as the .pr5 file.
Command-line usage
Show the available commands and options:
mapsys --help
All commands share logging flags: --debug/--no-debug, --trace/--no-trace,
and --log-file to redirect logs. Version is available via --version.
Export a single project from a directory that contains exactly one .pr5
file:
mapsys to-dxf /path/to/project \
--dxf-template template.dxf \
--dxf /path/to/output.dxf
Export all projects found under a directory tree (one DXF per .pr5 file):
mapsys to-dxf-dir /path/to/root \
--dxf-template template.dxf
Notes:
- The template should define at least a
POINTblock with attributesNAME,SOURCEandZ.If it does a circle will be created for each point. - The tool derives layer names and colors from your MapSys layers.
- When using
to-dxf, the directory must contain exactly one.pr5file.
XLSX export
Export a single project to an Excel workbook:
mapsys to-xlsx /path/to/project \
--xlsx /path/to/output.xlsx
Export all projects to Excel under a directory tree:
mapsys to-xlsx-dir /path/to/root --max-depth -1 --exclude-backup
Details:
- Sheets:
NO5_points,TS5_texts,TE5_meta,AR5_polys,AS5_offsets,AL5_layers, and if availablePR5_layers,PR5_after,PR5_fonts. - Columns: nested structures are flattened into multiple columns, and an
idxcolumn is added with the 0-based row index. - Types: floats formatted to 3 decimals; unknowns written as text; bytes as hexadecimal strings.
Project structure
High-level overview of the most relevant folders and files:
mapsys/cli.py: Command-line interface (commandsto-dxfandto-dxf-dir). Configures logging and loads environment variables.mapsys/__main__.py: Entry-point adapter that runs the CLI when you invokepython -m mapsysor themapsyscommand.mapsys/dxf/to_dxf.py: DXF export builder. Contains theBuilderthat creates layers, inserts point blocks, writes polylines and texts, and saves the DXF file.mapsys/dxf/dxf_colors.py: Helpers for mapping MapSys colors and line weights to DXF values.mapsys/parser/: Parsers for MapSys/VA50 binary files used by projects:pr5_main.py: Reads the "main" project metadata and layer definitions.al5_poly_layer.py: Polyline-to-layer mapping.ar5_polys.py: Polyline sequences and their attributes.as5_vertices.py: Vertex indices used by polylines.n05_points.py: Point coordinates.te5_text_meta.py: Text placement and style metadata.ts5_text_store.py: Text storage and decoding.content.py: Convenience aggregator that ties the pieces together.mdb_support.py: Optional Microsoft Access.mdb/.accdbtable extractor via ODBC, for related data.
tests/: Automated tests that verify the parsers and the DXF export. Includes tests for the XLSX export and CLI commands.
Troubleshooting
- DXF export fails immediately: ensure your folder contains exactly one
.pr5main file and that you passed a valid--dxf-templatepath. - On Windows, if you use
mdb_support.pyagainst Access databases, you may need the Microsoft Access Database Engine ODBC driver installed. On Linux, an alternative ismdbtoolswith unixODBC ({MDBToolsODBC}driver). - If
mapsysis not found, make sure your virtual environment is activated and that you installed the package withpip install -e ..
Development
Install development tools and run checks:
Common tasks
# Format
make format
# Lint
make lint
# Tests (type-check + pytest)
make test
# Fix simple lint issues automatically
make delint
The CLI entry point is mapsys.__main__:cli and can be invoked as:
python -m mapsys --help
Project conventions
- Typed code, small modules, clear names
- Prefer stdlib and a minimal set of dependencies
- Follow ruff formatting and linting configuration in
pyproject.toml - Keep public APIs stable; if you change them, update
CHANGELOG.md
Release
On the local machine create a package and test it.
pip install build twine
python -m build
twine check dist/*
Change ## [Unreleased] to the name of the new version in CHANGELOG.md,
then create a commit, then create a new tag and push it to GitHub:
git add .
git commit -m "Release version 0.1.0"
git tag -a v0.1.0 -m "Release version 0.1.0"
git push origin v0.1.0
# or
git push origin --tags
In the GitHub repository page create a new Release. This will trigger the workflow for publishing in PyPi.
License and attribution
See LICENSE for licensing terms.
MapSys is a product of GeoTop SRL (Odorheiul Secuiesc, Romania). All trademarks are the property of their respective owners. This project is a community utility intended for interoperability and learning and is not affiliated with GeoTop SRL.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mapsys-0.0.1.tar.gz.
File metadata
- Download URL: mapsys-0.0.1.tar.gz
- Upload date:
- Size: 65.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1faae7ebc7e02a5d2ef08ed1014d55bdd3b24ab63c5854c2511e395351436736
|
|
| MD5 |
92b0112eb5c5af9d458b50f5e072c02c
|
|
| BLAKE2b-256 |
c4dc1c219465454e490aa1da52b89d5516e66f2d1e579d794f44bff5156bc75e
|
Provenance
The following attestation bundles were made for mapsys-0.0.1.tar.gz:
Publisher:
publish.yml on pyl1b/mapsys-extractor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mapsys-0.0.1.tar.gz -
Subject digest:
1faae7ebc7e02a5d2ef08ed1014d55bdd3b24ab63c5854c2511e395351436736 - Sigstore transparency entry: 584328624
- Sigstore integration time:
-
Permalink:
pyl1b/mapsys-extractor@68acb088caafa74f3880513b761f5f29c9cc93e1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/pyl1b
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@68acb088caafa74f3880513b761f5f29c9cc93e1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mapsys-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mapsys-0.0.1-py3-none-any.whl
- Upload date:
- Size: 67.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13e744075c6c0633efb84875096ee897196e0ef2baf406e37faf07d555ab5a3b
|
|
| MD5 |
b9eb9296b44f880dc13e568931768933
|
|
| BLAKE2b-256 |
b215874b27d99532c657d1c328feebc618bd39b486d025b41b7db83b1abcebf8
|
Provenance
The following attestation bundles were made for mapsys-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on pyl1b/mapsys-extractor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mapsys-0.0.1-py3-none-any.whl -
Subject digest:
13e744075c6c0633efb84875096ee897196e0ef2baf406e37faf07d555ab5a3b - Sigstore transparency entry: 584328625
- Sigstore integration time:
-
Permalink:
pyl1b/mapsys-extractor@68acb088caafa74f3880513b761f5f29c9cc93e1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/pyl1b
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@68acb088caafa74f3880513b761f5f29c9cc93e1 -
Trigger Event:
release
-
Statement type: