Ovitalmap Parcel CSV
/install ovitalmap-parcel-csv
Ovitalmap Parcel CSV Generator
This skill processes parcel vertex coordinates — from images or text — and produces Ovitalmap-readable CSV files. It also archives every processed parcel into a structured per-country database with categorization metadata.
0) Defaults: Language, Tone, I/O
- Reply language: Chinese by default unless the user requests another language.
- Tone: non-repetitive, concise, precise, professional.
- Ambiguity handling: when inputs are unclear (e.g., parcel ID meaning, UTM zone/hemisphere, provider name), ask targeted clarifying questions via
AskUserQuestion. - CSV headers: keep original Chinese headers exactly as listed below. Do not translate them.
1) Inputs and Core Assumptions
- Input: one or more images or text blocks that contain parcel vertex coordinates.
- Coordinate parsing: auto-detect format:
- Decimal degrees:
22.50422, 114.13472 - DMS:
22°30'15.2"N, 114°08'05.0"E - UTM with zone and hemisphere
- Other formats on a best-effort basis
- Decimal degrees:
- WGS84 policy:
- Always display the raw recognized coordinates verbatim per parcel.
- Always display WGS84 decimal-degree coordinates (convert if needed).
- Date token (YYMMDD):
- Use user-provided date if given.
- Else use today's local date.
- CSV format: UTF-8, comma-separated, no BOM.
2) Country and Parcel Codes
2.1) Country Code
- Auto-determine the country from parcel coordinates using WebSearch / coordinate lookup. Do NOT ask the user to confirm — simply state the result and proceed. The user will correct it if wrong.
- Default standard: ISO 3166-1 alpha-3 (e.g., HKG, CHN, USA, FRA). On request, allow ISO 3166-3 or other variants.
- Cross-border parcels: if coordinates happen to span borders, use the country where the majority of the parcel falls. Do not split.
2.2) Parcel Code — Always Generated
Every parcel MUST receive a parcel_code. There is no "no code" fallback.
The code follows one of two formats, with priority given to official registration IDs:
| Priority | Source | Format | Example |
|---|---|---|---|
| 1 (preferred) | Official registration ID found in image text or explicitly provided by user | {ISO3}-{OFFICIAL_ID} |
CHN-PE12345, AUS-EL9876 |
| 2 (default) | Auto-generated sequential code | {ISO3}-{YYMMDD}-{SEQ} |
CHN-260609-003, HKG-260609-001 |
Official registration ID detection:
- Scan all text extracted from images AND any text the user provides directly.
- If a clear mining cadastre / registration / permit number appears, present it to the user for confirmation before adopting it.
- If multiple candidate IDs appear for the same parcel, pick the most specific one and ask the user to confirm.
2.3) Uniqueness Check (Mandatory Before Code Assignment)
Before finalizing any parcel_code, you MUST scan the existing archive to prevent duplicates. This is critical because:
- Users may upload multiple parcels in one session or across separate sessions on the same day.
- A new session must NOT restart SEQ from 001 — it must continue from the last used number.
Procedure:
- Read
ovitalmap_archive/{ISO3}_parcels.csv(if it exists). - Extract all existing
parcel_codevalues. - For official registration IDs (format 1): check that
{ISO3}-{OFFICIAL_ID}does NOT already exist. If it does, warn the user and ask for clarification. - For sequential codes (format 2): find the maximum SEQ already used for today (
{ISO3}-{YYMMDD}-*). The new SEQ = max_existing + 1. If none exist for today, SEQ starts at001. - If the archive file does not exist yet, SEQ starts at
001.
3) Output Files Overview
Two CSVs are produced together for the batch:
| # | File | Description |
|---|---|---|
| 1 | Vertices CSV (顶点表) | Every parcel vertex |
| 2 | Boundary CSV (边界表) | Every parcel as a closed polygon |
3.1) File Naming & Layout
Store generated CSVs in country subdirectories under ovitalmap_exports/:
ovitalmap_exports/{ISO3}/
Use the first parcel's code as the file base — since codes are globally unique (§2.3), this guarantees no collisions even with multiple batches on the same day:
| File | Pattern |
|---|---|
| Vertices CSV | {firstCode}_N{count}.csv |
| Boundary CSV | {firstCode}_N{count}_boundary.csv |
firstCode= theparcel_codeof the first parcel in this batch.count= total number of parcels in this batch.firstCodealready encodes country + date, so no redundant prefixes.
Examples:
CHN-260609-001_N2.csv— batch of 2, first is 001.CHN-260609-003_N2.csv— another batch of 2 on the same day, first is 003. No collision.CHN-PE12345_N1.csv— single parcel with an official registration code.
4) Vertices CSV (顶点表)
Headers (exact, in order, do not translate):
文件夹,名称,经度,纬度,海拔,文本显示风格,图标样式,Comment
Field Rules
| Field | Rule |
|---|---|
| 文件夹 | {parcel_code} — always |
| 名称 | {parcel_code}_A{vertex-index}. vertex-index starts at A01 and increases by original vertex order |
| 经度 | WGS84 decimal longitude. Preserve sign and precision. No rounding. |
| 纬度 | WGS84 decimal latitude. Preserve sign and precision. No rounding. |
| 海拔 | Fill if present in input; else leave empty |
| 文本显示风格 | Empty by default |
| 图标样式 | Default 1 |
| Comment | Empty by default |
Indexing conventions
vertex-indexresets from 01 per parcel (A01, A02, …).- Preserve original vertex order. If ordering is unclear, ask the user about clockwise reordering.
5) Boundary CSV (边界表)
Headers (exact, in order, do not translate):
文件夹,名称,经纬度[经度+纬度],线条宽度,线条颜色,线条不透明度,闭合,线型,轨迹风格,Comment
Field Rules
| Field | Rule |
|---|---|
| 文件夹 | Same as Vertices CSV |
| 名称 | Same as Vertices CSV |
| 经纬度[经度+纬度] | Concatenate as lon,lat;lon,lat;… (no spaces) following Vertices order. Close the polygon by repeating the first vertex at the end if the input does not already close it. |
| 线条宽度 | Default 3 |
| 线条颜色 | Default 0X00FF0000 |
| 线条不透明度 | Default 50 |
| 闭合 | Default 1 |
| 线型 | Default 0 |
| 轨迹风格 | Default 1 |
| Comment | Empty by default |
6) Quality Checks and Special Cases
- Range checks: longitude ∈ [-180, 180], latitude ∈ [-90, 90]. Flag any violations explicitly.
- Duplicate vertices: keep first occurrence, mark later duplicates in the output and ask the user for confirmation.
- Cross-border parcels: use the country where the majority area falls (§2.1). Do not split.
- Missing altitude: leave the field empty; never infer or guess.
- Naming collisions: if 文件夹 + 名称 duplicates occur, append
-1,-2, … to the 名称 field and report the collision to the user. - Coordinate precision: preserve all decimal digits from the conversion. Do not round.
7) Archiving and Categorization (Database)
After generating the CSVs for a parcel, you MUST archive the parcel into the workspace database.
7.1) Archive Location
All archives live flat in ovitalmap_archive/ at the workspace root. One file per country:
ovitalmap_archive/{ISO3}_parcels.csv
If the file does not exist yet, create it with headers.
7.2) Archive CSV Headers
parcel_code,country,nearest_city,provider_name,archive_date,boundary_coords,provider_notes,cadastre_code
7.3) Field Rules for Archiving
| Field | Rule |
|---|---|
| parcel_code | Assigned per §2.2–2.3. Always populated. |
| country | Full country name in English |
| nearest_city | The closest city/town to the parcel coordinates. MANDATORY FACTUAL CHECK: you MUST use WebSearch or WebFetch to look up the nearest city based on the coordinates. Never fabricate a city name. If uncertain, search for "nearest city to coordinates {lat} {lon}" and cite the source. |
| provider_name | The name of the person/organization who provided this parcel. MUST ask the user for at least a name. If the user mentions a series of similar names, confirm with them before archiving. If they mention none of the names you suggest, treat it as a new provider. |
| archive_date | Date of archiving in YYYY-MM-DD format |
| boundary_coords | Full boundary string in the format lon,lat;lon,lat;… (same as Boundary CSV 经纬度 field). This is the canonical coordinate storage. |
| provider_notes | Any additional notes about the provider or context; empty by default |
| cadastre_code | PLACEHOLDER — leave empty for now. Reserved for future cadastre minier lookup skill. |
7.4) Provider Name Workflow
- At Step 1 (before any code assignment or file writing), ask the user: "Who provided this parcel? (请提供此地块的提供者姓名)"
- After the user provides a name, immediately scan all existing providers from both:
ovitalmap_archive/{ISO3}_parcels.csv(per-country archive)ovitalmap_archive/master.csv(cross-country archive)
- Proactive fuzzy deduplication — compare the user-supplied name against every existing provider. Flag a match if any of the following hold:
- Exact match: identical string (case-insensitive).
- Whitespace / punctuation variation: same characters but different spacing, hyphens, or dots (e.g.,
"Zhang San"≈"Zhang-San"≈"ZhangSan"). - Chinese ↔ Pinyin overlap: one is Chinese characters and the other is the corresponding pinyin (e.g.,
"张三"≈"Zhang San"). - Partial / suffix / prefix overlap: one name is fully contained within another OR they differ only by a common suffix/prefix (e.g.,
"李","总","先生","经理","老板","哥","姐"). Examples:"中非李"≈"中非李总"(suffix variation)."三一李"≈"三一李总"(suffix variation)."李总"⊂"中非李总"and ⊂"三一李总"(short name matches multiple).
- Handle matches based on count and type:
- Single candidate match: ask the user explicitly:
"检测到提供者 '{input_name}' 与已有记录 '{existing_name}' 高度相似。是否为同一个人?"
- If the user confirms same person → reuse the existing
provider_namespelling. - If the user says different person → treat as a new provider.
- If the user is unsure → keep the new name but add a note in
provider_notes:Possible duplicate of '{existing_name}'.
- If the user confirms same person → reuse the existing
- Multiple candidates match (e.g., user says
"李总", archive has"中非李总"and"三一李总"): list ALL candidates and ask the user to specify:"'{input_name}' 在已有记录中匹配到多位提供者:① {candidate1} ② {candidate2}。请问对应的是哪一位?或都不是(新建)?"
- If the user picks one → reuse that existing
provider_name. - If the user says none of them → treat as a new provider.
- If the user picks one → reuse that existing
- Single candidate match: ask the user explicitly:
- If no similar match exists, add the name as a new provider.
- If the user declines to provide a name, use
"Unknown"and note it. - Do not proceed to code assignment until provider name is confirmed.
8) Master Spreadsheet
After archiving to ovitalmap_archive/{ISO3}_parcels.csv, also append the same row(s) to a single consolidated file:
ovitalmap_archive/master.csv
This is a single spreadsheet containing every parcel from every country — the complete cross-country view.
Headers (one extra column vs per-country parcels.csv):
ISO3,parcel_code,country,nearest_city,provider_name,archive_date,boundary_coords,provider_notes,cadastre_code
Append every newly archived parcel row here immediately after writing to the per-country file. If master.csv does not exist, create it with headers.
9) Interaction Flow
Guard Rule
Do NOT write or modify any file until user confirms BOTH coordinates AND provider name. Step 1 is a hard gate — all subsequent steps (2–4) are blocked until the user explicitly confirms the parsed coordinates AND the provider(s).
When invoked, follow this sequence:
1. Parse, Verify & Confirm Provider
- Show raw coordinates and WGS84 conversion per parcel.
- Ask for the provider name(s) (§7.4). Identify each parcel's provider.
- Display ⚠️ "请核实以下识别和转换后的坐标是否与原始数据一致,并确认提供者姓名". → STOP HERE. Wait for user to confirm or correct coordinates AND provider. If user provides corrections, re-parse/re-confirm until both are confirmed.
2. Assign Codes (only after step 1 confirmed)
- Auto-determine country from coordinates, derive ISO3. State it, move on.
- Scan the archive for existing codes (§2.3). Detect any official registration IDs from image text or user input.
- Generate and display all
parcel_codevalues. The user will correct if wrong.
3. Build CSVs
Build both Vertices CSV (§4) and Boundary CSV (§5) together. Run quality checks (§6). State the generated filenames:
CSV 文件已生成:
- 顶点表:
{firstCode}_N{count}.csv- 边界表:
{firstCode}_N{count}_boundary.csv
4. Archive
- Factual city lookup from coordinates (§7.3).
- Append to
ovitalmap_archive/{ISO3}_parcels.csvandovitalmap_archive/master.csv. - Summarize: country, nearest city, provider, codes, date.
5. Wrap Up
Note any assumptions, edge cases, or corrections.
9b) Post-Archive Coordinate Correction
Users may correct a parcel's coordinates after it has been archived. When this happens:
Procedure
-
Identify the parcel by its
parcel_codeinovitalmap_archive/{ISO3}_parcels.csvandovitalmap_archive/master.csv. -
Backup before modifying — copy the current archive files to a backup:
ovitalmap_backups/{ISO3}_parcels_{YYMMDD_HHMM}.csv ovitalmap_backups/master_{YYMMDD_HHMM}.csvCreate
ovitalmap_backups/if it does not exist. -
Update the row in the per-country archive and master spreadsheet:
- Replace
boundary_coordswith the corrected boundary string. - Update
archive_dateto the current date (marking the correction date). - Append a note to
provider_notes:"[{date}] Coordinates corrected. Original backup: {backup_file}".
- Replace
-
Regenerate the export CSVs for the corrected parcel in
ovitalmap_exports/{ISO3}/. -
Summarize what was changed, where backups are, and ask the user to verify.
10) Example Output Snippet
⚠️ 请核实以下识别和转换后的坐标是否与原始数据一致,并确认提供者姓名
原始坐标:
• 地块 1: 22°30'15.2"N, 114°08'05.0"E; 22°30'14.8"N, 114°08'08.3"E; …
• 地块 2: 22.50422, 114.13472; 22.50418, 114.13480; …
WGS84:
• 地块 1: 114.13472, 22.50422; 114.13564, 22.50411; …
• 地块 2: 114.13472, 22.50422; 114.13500, 22.50416; …
请提供此地块的提供者姓名?
确认坐标无误并确认提供者后继续处理?(如有修正请提供)
→ 用户确认坐标 + 提供者: 张三
所属国家: 中国 (CHN)
正在扫描 CHN 存档…
现有编码: CHN-260609-001, CHN-260609-002
→ 地块 1 → CHN-260609-003
→ 地块 2 → CHN-260609-004
图像文本检测到注册号 PE12345 → 确认为地块 2 的官方登记号 → CHN-PE12345
最终编码:
• 地块 1: CHN-260609-003
• 地块 2: CHN-PE12345
CSV 文件已生成:
• 顶点表: CHN-260609-003_N2.csv
• 边界表: CHN-260609-003_N2_boundary.csv
--- 归档 ---
查询最近城市中…
✓ 深圳市 (Shenzhen), 中国
归档完成:
• 国家: 中国 (CHN) • 最近城市: 深圳市 • 提供者: 张三
• 地块编号: CHN-260609-003, CHN-PE12345
• 归档日期: 2026-06-09 • Cadastre: (待后续技能)
11) Future Extensions (Placeholders)
- Cadastre minier lookup: another skill will be developed to query official mining cadastre registries and populate the
cadastre_codefield. - Email dispatch: the summary spreadsheet will be periodically sent to a configured email address. The email configuration (recipient, SMTP, schedule) is not yet implemented.
12) File Structure
workspace/
├── ovitalmap_exports/ # Generated CSVs (by country subdir)
│ ├── CHN/
│ │ └── CHN-260609-001_N2.csv
│ ├── HKG/
│ │ └── HKG-260609-001_N1.csv
│ └── …
├── ovitalmap_archive/ # Persistent database (flat)
│ ├── master.csv # All parcels, all countries
│ ├── CHN_parcels.csv
│ ├── HKG_parcels.csv
│ └── …
├── ovitalmap_backups/ # Pre-correction snapshots (§9b)
│ ├── CHN_parcels_260609_1430.csv
│ └── master_260609_1430.csv
└── .trae/skills/ovitalmap-parcel-csv/
└── SKILL.md
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install ovitalmap-parcel-csv - After installation, invoke the skill by name or use
/ovitalmap-parcel-csv - Provide required inputs per the skill's parameter spec and get structured output
What is Ovitalmap Parcel CSV?
Parse parcel vertex coordinates from images/text, generate Ovitalmap-compatible CSVs (顶点表 + 边界表), categorize parcels by country/city/provider, and archive in... It is an AI Agent Skill for Claude Code / OpenClaw, with 38 downloads so far.
How do I install Ovitalmap Parcel CSV?
Run "/install ovitalmap-parcel-csv" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Ovitalmap Parcel CSV free?
Yes, Ovitalmap Parcel CSV is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Ovitalmap Parcel CSV support?
Ovitalmap Parcel CSV is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Ovitalmap Parcel CSV?
It is built and maintained by Jérôme Xinglin QIAN (@jeromeex); the current version is v1.0.1.