MalaGIS

Sharing GIS Technologies, Resources and News.

Accessing Pre-Vectorized Trail Data from China's Outdoor Platform: Two Step Road

Building upon our previous tutorials on 《Creating Dynamic Marathon Route Visualizations with MapPlus: A No-Code GIS Solution》 and 《Implementing Dynamic Marathon Route Visualization with Cesium》, this guide introduces a solution for users seeking pre-processed trajectory data without manual digitization.

Introducing Two Step Road Platform

Official Website: https://www.2bulu.com/

more >>

Implementing Cesium in Legacy WebGIS Projects: Overcoming Node Version Constraints

When integrating Cesium into a legacy UMI3-based WebGIS project, Node version compatibility issues arose due to Cesium's requirement for Node ≥18.18.0. Direct Node upgrade would trigger extensive regression testing, making alternative deployment approaches necessary.

more >>

Comparative Evaluation of Public CDN Resources for CesiumJS Deployment

When deploying CesiumJS projects, the library's substantial size (~100MB) often slows CI builds. This analysis evaluates domestic CDN options for external Cesium loading to optimize deployment efficiency without compromising functionality.

more >>

Maptalks: An Open-Source Alternative to Cesium for Geospatial Visualization

Following Bentley Systems' acquisition of Cesium and its increasing commercial integration, GIS professionals are exploring alternative open-source solutions for 3D geospatial projects. Maptalks emerges as a viable option, particularly for projects requiring domestic innovation ecosystem compliance.

more >>

Implementing Dynamic Marathon Route Visualization with Cesium

As an alternative to the MapPlus solution presented in our previous article 《Creating Dynamic Marathon Route Visualizations with MapPlus: A No-Code GIS Solution》, this guide demonstrates a Cesium-based implementation for dynamic route visualization. Developed with ChatGPT assistance and requiring no commercial subscriptions, this approach achieves approximately 70% of MapPlus functionality.

more >>

Installing Third-Party Libraries for ArcGIS Desktop Python Environment

When working on data processing projects with ArcGIS Desktop (non-Pro version), extending arcpy functionality often requires installing third-party libraries. Since Python 2 doesn't include pip by default, this guide outlines the installation process.

Prerequisites

  1. Install ArcGIS Desktop
  2. Add Python path to environment variables (e.g., C:\Python27\ArcGIS10.X)
  3. Remove other Python paths from system variables

more >>

Automated Geodatabase Schema Documentation with ArcPy

During a recent data processing project, I developed an ArcPy script to automate geodatabase schema documentation for technical reports, eliminating manual field inventory tasks. This solution leverages arcpy for data extraction and xlwt for Excel output generation.

Output Preview

The script produces structured Excel sheets detailing field names, aliases, data types, lengths, and spatial references:

more >>

Automated Raster Extent Vectorization Using ArcPy

When managing large volumes of high-resolution satellite imagery (e.g., 1:10,000 scale sheets), visualizing coverage gaps becomes challenging due to performance limitations in ArcMap. This script automates the creation of vector polygons representing raster extents for efficient gap analysis.

ArcPy Vectorized Raster Extents
Visualization: Red outlines = actual coverage, Green polygons = generated extents


Detail showing alignment accuracy

Implementation Code

# -*- coding: utf-8 -*-
import os
import time
import arcpy

def create_directory(path):
    """Ensure directory exists, create if missing"""
    if os.path.isdir(path):
        if not os.path.exists(path):
            os.makedirs(path)
    else:
        parent_dir = os.path.dirname(path)
        if not os.path.exists(parent_dir):
            os.makedirs(parent_dir)

if __name__ == '__main__':
    # Configure input/output
    raster_directory = r'F:\gisData\data0929\refY202410072'
    output_shapefile = os.path.join(raster_directory, 'shp', 'RasterExtent.shp')
    
    start_time = time.time()
    arcpy.env.workspace = raster_directory
    raster_list = arcpy.ListRasters()
    
    if not raster_list:
        raise IOError("Error: No raster files found!")
    
    # Prepare output feature class
    if arcpy.Exists(output_shapefile):
        arcpy.Delete_management(output_shapefile)
    
    create_directory(output_shapefile)
    output_fc = arcpy.CreateFeatureclass_management(
        os.path.dirname(output_shapefile), 
        "RasterExtent.shp", 
        "POLYGON"
    )
    arcpy.AddField_management(output_fc, "RasterName", "TEXT", 50)
    
    # Process rasters
    with arcpy.da.InsertCursor(output_fc, ["SHAPE@", "RasterName"]) as cursor:
        for raster_file in raster_list:
            raster = arcpy.Raster(raster_file)
            extent = raster.extent
            
            # Construct polygon from extent
            polygon_points = arcpy.Array([
                arcpy.Point(extent.XMin, extent.YMin),  # LL
                arcpy.Point(extent.XMin, extent.YMax),  # UL
                arcpy.Point(extent.XMax, extent.YMax),  # UR
                arcpy.Point(extent.XMax, extent.YMin),  # LR
                arcpy.Point(extent.XMin, extent.YMin)   # Close ring
            ])
            
            cursor.insertRow([arcpy.Polygon(polygon_points), raster_file])
    
    # Performance metrics
    elapsed = time.time() - start_time
    print(f"Process completed in: {elapsed:.2f} seconds")

Key Workflow

  1. Input Configuration: Specify directory containing raster files
  2. Output Handling: Automatically creates output shapefile
  3. Extent Extraction:

    • Retrieves XMin/YMin/XMax/YMax for each raster
    • Constructs rectangular polygons from corner coordinates
  4. Attribute Storage: Preserves original raster filenames

Advantages

  • Eliminates manual extent digitization
  • Enables efficient coverage gap analysis
  • Handles thousands of rasters in batch processing
  • Integrates with standard ArcGIS workflows
Note: Requires ArcGIS Desktop with Spatial Analyst extension. Execution time scales linearly with raster count.

Creating Marathon Distribution Heatmaps in QGIS

Following our previous article on Processing China Marathon Data for Spatial Analysis, this guide demonstrates heatmap visualization of marathon venues using QGIS.

more >>

Processing China Marathon Data for Spatial Analysis

In follow-up to our tutorial on Creating Dynamic Marathon Route Visualizations with MapPlus: A No-Code GIS Solution, we compiled a comprehensive dataset of Chinese marathons through automated data processing. This article documents the methodology and technical implementation.


Marathon distribution heatmap in QGIS

more >>

Copyright © 2020-2025 MalaGIS Drive by Typecho & Lingonberry Sitemap

Back to top