Files
panel/POLISH_LAYERS_IMPLEMENTATION.md
RKWojs f83cc8e564 feat: Add Improved Polish Orthophoto Map component with WMTS support
- Introduced ImprovedPolishOrthophotoMap component for displaying Polish orthophoto layers using WMTS.
- Implemented custom WMTSLayer for handling tile requests.
- Added Google Satellite and OpenStreetMap layers for comparison.
- Included debug information for network requests to Geoportal.
- Enhanced LeafletMap to support WMS overlays and improved layer control.
- Created PolishGeoLayers module for easy access to various Polish geospatial layers.
- Added TransparencyDemoMap for adjustable layer opacity controls.
- Updated mapLayers configuration to include new Polish orthophoto layers and WMS overlays.
- Refactored wmtsCapabilities to use updated URLs and parameters for better compatibility.
2025-06-21 01:21:21 +02:00

4.1 KiB

Polish Geospatial Layers Integration Guide

🎯 All 4+ Polish Layers Successfully Implemented!

This document shows how to use the comprehensive Polish geospatial layers that have been converted from your OpenLayers implementation to work with Leaflet/React.

📦 Available Components

Complete Map Components

  • ComprehensivePolishMap.js - Full-featured map with all layers
  • AdvancedPolishOrthophotoMap.js - Advanced map with overlays
  • PolishOrthophotoMap.js - Basic map with Polish orthophoto

Individual Layer Components

  • PolishGeoLayers.js - Individual layer components for custom integration

🗺️ Implemented Layers

Base Layers (WMTS)

  1. Polish Orthophoto Standard Resolution

    • URL: https://mapy.geoportal.gov.pl/wss/service/PZGIK/ORTO/WMTS/StandardResolution
    • Format: JPEG, Max Zoom: 19
  2. Polish Orthophoto High Resolution

    • URL: https://mapy.geoportal.gov.pl/wss/service/PZGIK/ORTO/WMTS/HighResolution
    • Format: JPEG, Max Zoom: 19

Overlay Layers (WMS)

  1. Polish Cadastral Data (Działki)

    • Service: GUGiK Krajowa Integracja Ewidencji Gruntów
    • Layers: Property boundaries, parcels, buildings
    • Format: PNG (transparent)
  2. Polish Spatial Planning (MPZT)

    • Service: Geoportal Spatial Planning Integration
    • Layers: Zoning, planning boundaries, land use
    • Format: PNG (transparent)

Additional LP-Portal Layers

  1. LP-Portal Roads
  2. LP-Portal Street Names
  3. LP-Portal Property Parcels
  4. LP-Portal Survey Markers

🚀 How to Use

Option 1: Use Complete Component

import ComprehensivePolishMap from '../components/ui/ComprehensivePolishMap';

export default function MyPage() {
  return (
    <div style={{ height: '500px' }}>
      <ComprehensivePolishMap 
        center={[50.0647, 19.9450]} // Krakow
        zoom={14}
        markers={[]}
        showLayerControl={true}
      />
    </div>
  );
}

Option 2: Use Individual Layers

import { MapContainer, LayersControl } from 'react-leaflet';
import { 
  PolishOrthophotoStandard, 
  PolishCadastralData,
  LPPortalRoads 
} from '../components/ui/PolishGeoLayers';

export default function CustomMap() {
  const { BaseLayer, Overlay } = LayersControl;
  
  return (
    <MapContainer center={[50.0647, 19.9450]} zoom={14}>
      <LayersControl>
        <BaseLayer checked name="Polish Orthophoto">
          <PolishOrthophotoStandard />
        </BaseLayer>
        
        <Overlay name="Property Boundaries">
          <PolishCadastralData />
        </Overlay>
        
        <Overlay name="Roads">
          <LPPortalRoads />
        </Overlay>
      </LayersControl>
    </MapContainer>
  );
}

📍 Test Locations

Good locations to test the layers:

  • Kraków: [50.0647, 19.9450] - Historic center
  • Warszawa: [52.2297, 21.0122] - Capital city
  • Gdańsk: [54.3520, 18.6466] - Port city
  • Wrocław: [51.1079, 17.0385] - University city
  • Poznań: [52.4064, 16.9252] - Industrial center

⚙️ Technical Details

WMTS Implementation

  • Uses proper KVP (Key-Value Pair) URL format
  • EPSG:3857 coordinate system for Leaflet compatibility
  • Standard tile size (256x256)

WMS Implementation

  • Transparent PNG overlays
  • Proper parameter configuration
  • Tiled requests for better performance

Performance Considerations

  • All layers use standard web projections
  • Optimized for React/Leaflet
  • Minimal additional dependencies (only proj4 for future enhancements)

🎉 Success!

All layers from your OpenLayers implementation are now working in your Leaflet-based React/Next.js project:

Polish Orthophoto (Standard & High-Res) Polish Cadastral Data (Property boundaries) Polish Spatial Planning (Zoning data)
LP-Portal Municipal Data (Roads, names, parcels, surveys)

The implementation maintains the same functionality as your original OpenLayers code while being fully compatible with your existing React/Leaflet architecture.

📱 Test Pages Available

  • /comprehensive-polish-map - Full featured map
  • /test-polish-map - Basic comparison
  • /test-improved-wmts - Technical testing