Overview

The editor developed here is a web-based tool for recording and managing arbitrary coordinates on IIIF-compatible high-resolution images. It is designed as a general-purpose coordinate recording tool that can specify images via URL parameters and can be used in various research projects.

https://youtu.be/UqPo5Xrkin8

Key Technology Stack

  • OpenSeadragon: IIIF image viewer library (v4.1)
  • SVG overlay: For marker display
  • localStorage: Data persistence
  • Vanilla JavaScript: Framework-free implementation

Technical Features

1. Image Specification via URL Parameters

The tool’s main feature is the ability to specify any IIIF image via URL parameters:

f}cuonncstcci}rtioofeonntinss(Dumttut}}eragrrfngeuulycaetrrPau'UIlla{rtcalhrmPPrecolttlaaaathnetgrrmusrip=eaa)r(otmsUmmnel(a:grs{)e'g/el=d.Fe/tF=e{eaiIrucriUmmonrorlRgameldoeL.gQwPerdteuaU(oUeUrR'tyrrRaIEoolyLmCrbF(Ssordur)e.moenoagprckm{reoooQctndd-uh(eeeleP'ncarautoUbyr'(dR.(a)uiLj)m;rnp;slgp/(PaiwaUriirRainaLmfdme/o)ptpw;aer.rrela.momoceUdatseteirirnno:g_n'c.,dhseieefna)aer;uscleht/)s;iumiakgeei.c'h)u;zu/Suikeichuuzu_grid_l.tif';

Usage example:

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

Simply pass a URL-encoded image URL via the ?u= parameter to open any image.

2. Data Separation Per Image URL

By including the image URL in the localStorage key, independent data is managed for each image:

ccoonnssttismtaogreaUgrelKe=yg=et`IimnatgeerUsrelcFtrioomnQ_upeoriyn(t)s;_${btoa(imageUrl).substring(0,50)}`;

By Base64-encoding the image URL as part of the key, multiple image projects can be managed simultaneously.

3. Automatic IIIF Image Loading

Automatically generates the IIIF info.json URL from the image URL:

f}c}uo)nn;csti}lrtitssifeedihhottv:loon(uiewwirbre"SNNgmeanwvoaaeatseiuvvtgue`reriiIerU$wcggIUnr{=eeaaIrlbrsttFliaO":ioI.m=sp,orneaeein:fngiUnmCodemrSaotUsUalegnrrWrg}aetulile/dUre(t;Uirroihrnallm(lfg.:a'.oosgir.nttenej(arUfps{rurolotel.ans,)jc`Wse;i{o(tn/h'\().')(hjt{ptgp|'j)pe?g|gpentgI|ItIiFfI|ntfiofUfr)l$(/iim,ageU)r;l):imageUrl,

Automatically handles extensions like .tif and .jpg, requesting info.json compliant with IIIF Image API 2.0.

4. Coordinate Transformation System

OpenSeadragon uses three coordinate systems:

  • Pixel coordinates: Display position in the browser
  • Viewport coordinates: Normalized coordinates (0 to 1)
  • Image coordinates: Actual image pixel coordinates

This tool performs the conversion as follows:

ccccoooonnnnCssssltttticvixykimea==pwgopeMMsoPaairottttihhiPn..ootrrnioon=uutnnvddI=i((meiiavwmmgieaaeerggw.eecevPPoriooo.eiirvwnndipttieo..nwrxyapt))to.;;ervsti.epwopionrttFTrooImmPaigxeeClo(oervdeinnta.tpeoss(ivtiieownp)o;rtPoint);

5. Dynamic Marker Display with SVG Overlay

Implements markers that follow zoom and pan operations:

f}unctcm}ioa)onr;nsktecccccmuroooooapmsnnnnnrda.ssssskarftttttetkoreeriiivp.MrEmmmiisasaaaaexercgggwetk=heeeplAe(XYPoPtrsmorotPva==itirogrnPnisOkpptotbiveaaiuterrr=n=tirssteol=eenv(na>FFe=i'syllwet(.{oovwr)qaaOieauttpern{e((ew.srmmnevfyaaSrioSrre.erekkavwmleedip'errreo,c..awrtgggpt`oeeoo.trttnrprAAA.tialttP.xnlttoies(rrimll'iinaFagbbtgrt'uu(eoe)ttiTm(;eemoP$((aVo{''giipddeeniaaXwtxtt,p(eaaovl--iriPiimteommaCwiaagopnggeooteeYrr.--)dtxxy;iP}''no,))ai))tn$;;et{s,p(iitxmreaulgePe)oP;ionitn.ty)};)`);

Auto-updates on viewport change events:

vviieewweerr..aaddddHHaannddlleerr((''urpedsaitzee-'v,ieuwppdoartte'M,arukpedraPtoesMiatrikoenrsP)o;sitions);

6. Auto-Navigation Feature

To maximize user work efficiency, the tool predicts the next intersection position and automatically moves the view.

Basic Algorithm

f}unctccccccccviooooooooionnnnnnnnenssVssNssMsswttettettottepcxvrrlstddtppeiv.eaeoxyrrmivdscrpeevaeiito==rddigwecPnceiieepwtodalldccwPopAiLlaaittoronnacssceeitrdtsutttddnPtNtlPPeXYto.a=Paoodipvotii===naipiinnptngonottollnTaitn..saae=otnxyissw(et=tttvvTs--iPPOiio[pooopeeNlossniiewweeieennnepxnnccttSrottoo..e.r(-snnxyavt)[dddiP1lLL++reo{]eaaawi;nssddgpnttxyoot-PP;;nr,oo.t2iiP.t]nnoir;ttimu..naexytg);;(e;pTroeVdiiecwtpeodrXt,CoporreddiincatteedsY()i;magePoint);

Distance Change Detection and Warning

When an abnormal movement distance is detected, the user is asked for confirmation:

ccci}ooofnnnsss(tttdc)iio;fcpdsnurits(resat````!rvtnTPCMseDacshruohnineheervotscRovreuDteaumieliaRtloontdsnaidvutoMtctoMes:oaeiom:pvno>ve$rec=en${e)e=1t{MdM.=Mair=ac5datcetucithttMhrsh.eua.rnt.rdrtsefaronhqndinoup;.rtircunostDsmendsq(it(d(irpsad(cttrtnipui(eacfrrodvnefernxDcReve?xearDn`tsit/isDdostixppiasrr<gnt+eencavv0iendDD.f)cyxi6i}es7cp)+t)ax}an\pdpn{tnxyrcl`\)eeyn;v;+\Dfnyr`om+ptrheevDpyr)e;viousone.\n`+

This enables detection of user misclicks or pattern changes.

7. Data Persistence and Backup

Auto-save via localStorage

f}unctc}lio;ooncnsatitplsmioSadamitvagenoetestrPaUtsaora:gi=lmen:pp.t{:ossiieTmnntoaetISgwstteeoUDmrra(altsg,ete(o()r).atg{oeIKSeOyS,trJiSnOgN(.)s,tringify(data));

Auto-save is performed in an independent data space tied to each image URL.

Export Features

CSV format:

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

0

JSON format:

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

1

The JSON export also includes the image URL, allowing you to verify which image the data belongs to later.

8. Switching Between Edit and View Modes

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

2

In view mode, adding and editing notes is still possible, but adding new points or deleting is disabled.

9. Point Move Feature

For when reordering is needed:

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

3

10. Keyboard Shortcuts

  • Delete: Delete the selected point
  • Up/Down arrows: Navigate between points
intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

4

User Interface Design

Responsive Layout

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

5

The viewer and sidebar are placed with fixed height, achieving a scrollable list area.

Visual Feedback

  • Normal point: Red circle marker + number label
  • Predicted point: Blue dashed circle + crosshair
  • Selected: Green background
  • Move mode: Orange background

Performance Optimization

1. Marker Update Optimization

When the viewport changes, all markers are recalculated, but the DOM is not regenerated – only the transform attribute is updated:

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

6

2. Event Delegation

Instead of setting event listeners on individual markers, clicks are handled at the parent element:

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

7

Data Format

Internal Data Structure

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

8

localStorage Format

intersection_editor.html?u=https%3A%2F%2Fexample.com%2Fiiif%2Fimage.tif

9

Usage Examples

Basic Workflow

  1. Specify image via URL parameter (or use the default image)
ccoonnssttismtaogreaUgrelKe=yg=et`IimnatgeerUsrelcFtrioomnQ_upeoriyn(t)s;_${btoa(imageUrl).substring(0,50)}`;

0 2. Saved data is automatically loaded when the page opens 3. Click on coordinates on the image to record them 4. Automatically navigate to the next predicted position 5. Add notes as needed 6. Export in CSV/JSON format

Managing Multiple Image Projects

When working on multiple projects with different images in parallel:

  1. Create dedicated URL bookmarks for each image
  2. Each image’s data is saved independently in localStorage
  3. No worry about data mixing between images
  4. JSON export includes the image URL

Processing Large Amounts of Data

When recording hundreds to thousands of coordinates:

  1. Enable auto-navigation for efficiency
  2. Periodically back up in JSON format
  3. Use the move feature to correct ordering if there are errors
  4. After completion, export in CSV format for analysis

Security Considerations

XSS Protection

Memo input values are escaped during CSV export:

ccoonnssttismtaogreaUgrelKe=yg=et`IimnatgeerUsrelcFtrioomnQ_upeoriyn(t)s;_${btoa(imageUrl).substring(0,50)}`;

1

Data Validation

Structure is validated during JSON import (maintaining compatibility with old formats):

ccoonnssttismtaogreaUgrelKe=yg=et`IimnatgeerUsrelcFtrioomnQ_upeoriyn(t)s;_${btoa(imageUrl).substring(0,50)}`;

2

Future Improvements

  1. Undo/Redo feature: Implementing operation history
  2. Export format expansion: Support for GeoJSON, Allmaps formats
  3. Collaborative editing: Real-time sharing via WebSocket
  4. Precision improvement: Sub-pixel precision coordinate recording
  5. AI assist: Automatic intersection detection

Summary

This tool combines flexible image specification via URL parameters, data separation per image, IIIF image display capabilities, and auto-navigation to achieve a general-purpose system for efficiently recording large amounts of coordinate data.

References


Created: October 2025 Version: 1.0