Philippine GIS & GeoJSON Integration Guide
A technical developer manual covering spatial coordinate projections, RFC 7946 GeoJSON schemas, TopoJSON simplification, and Turf.js spatial join algorithms for Philippine maps.
1. Philippine Coordinate Reference Systems (CRS)
Geographic coordinate data in the Philippines is historically published using two distinct reference frameworks:
WGS 84 (EPSG:4326) — Web Standard
The global standard coordinate system used by web mapping libraries (Mapbox GL JS, Leaflet, Turf.js, OpenLayers). Coordinates are expressed in decimal degrees (e.g. Latitude: 14.5995° N, Longitude: 120.9842° E). All mapaPH GeoJSON assets use EPSG:4326.
PRS92 (EPSG:3121–3125) — Legacy Cadastral
Philippine Reference System 1992, used by NAMRIA and DENR for official land titling and cadastral surveys across 5 Transverse Mercator zones. Requires reprojection via GDAL or PROJ4 before rendering in modern web maps.
2. mapaPH RFC 7946 GeoJSON Feature Schema
Boundary GeoJSON files exported from mapaPH tools comply strictly with the RFC 7946 specification. Every feature polygon includes standard metadata attributes:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "045618000",
"properties": {
"psgc": "045618000",
"name": "Subic",
"level": "Municipality",
"province": "Zambales",
"region": "Central Luzon",
"regionCode": "03",
"population2020": 111912,
"landAreaSqKm": 287.16
},
"geometry": {
"type": "Polygon",
"coordinates": [
[ [120.231, 14.881], [120.245, 14.892], ... ]
]
}
}
]
}3. Performing Point-in-Polygon Queries via Turf.js
To identify which Philippine municipality or barangay contains a given latitude/longitude coordinate pair, use Turf.js client-side point-in-polygon matching:
import * as turf from '@turf/turf';
// Define a user point (e.g., Luneta Park, Manila)
const userPoint = turf.point([120.9794, 14.5831]);
/**
* Finds the administrative municipality containing the point.
*/
function findContainingMunicipality(point, geojsonFeatures) {
for (const feature of geojsonFeatures) {
if (turf.booleanPointInPolygon(point, feature)) {
return {
name: feature.properties.name,
psgc: feature.properties.psgc,
province: feature.properties.province
};
}
}
return null;
}