Skip to content

Instantly share code, notes, and snippets.

View aspose-com-gists's full-sized avatar

Aspose.com Gists aspose-com-gists

View GitHub Profile
@aspose-com-gists
aspose-com-gists / asposegis_gpx_to_geojson_pipeline_complete_code_ex.py
Created May 8, 2026 12:39
GPX to GEOJSON Conversion Tutorial in Python
# -*- coding: utf-8 -*-
import sys
import json
from aspose.gis import GisFile, GisException
def convert_gpx_to_geojson(input_path: str, output_path: str) -> None:
try:
# Load GPX file
gpx = GisFile.open(input_path)
@aspose-com-gists
aspose-com-gists / gpx_to_csv_conversion_implementation_complete_code.py
Last active May 8, 2026 12:30
GPX to CSV Conversion Guide using Python
from aspose.gis import VectorLayer, ConversionOptions
from aspose.gis import Drivers
# Convert file format from GPX to CSV.
VectorLayer.convert(
"Data/sample.gpx",
Drivers.gpx,
"output/destination.csv",
Drivers.csv
)
@aspose-com-gists
aspose-com-gists / xbrl_instance_to_xlsx_conversion_complete_code_exa.py
Last active April 28, 2026 11:13
How to Perform XBRL to XLSX Conversion using Python
from aspose.finance.xbrl import *
import sys
def convert_xbrl_to_xlsx(input_path: str, output_path: str):
try:
# Initialize the XBRL document
xbrl_doc = XbrlDocument(input_path)
# Set conversion options
options = SaveOptions()
import aspose.cells
from aspose.cells import Workbook, SaveFormat
def convert_xlsx_to_csv(input_file: str, output_file: str):
try:
# Load the XLSX workbook
workbook = Workbook(input_file)
# Save the first worksheet as CSV
workbook.save(output_file, SaveFormat.CSV)
import asposebarcode as barcode
import aspose.pdf as pdf
def read_barcodes_from_pdf(pdf_path):
# Load PDF document
pdf_doc = pdf.PdfDocument(pdf_path)
# Initialize barcode reader
reader = barcode.BarcodeReader()
reader.decode_type = barcode.DecodeType.ALL_SUPPORTED_TYPES
from aspose.barcode import generation
from aspose.pydrawing import Color
def generate_swiss_barcode(data, jpeg_path, pdf_path):
# Initialize generator with Swiss QR Code symbology
generator = generation.BarcodeGenerator(
generation.EncodeTypes.SWISS_POST_PARCEL,
data
)
from aspose.barcode import generation
def generate_aztec_barcode(data, output_path):
# Create a BarcodeGenerator for Aztec symbology
generator = generation.BarcodeGenerator(
generation.EncodeTypes.AZTEC, # Symbology type
data # Data to encode
)
# Configure Aztec specific parameters
import aspose.threed as a3d
def convert_fbx_to_stl(input_path: str, output_path: str):
try:
# Initialize the scene and load the FBX file
scene = a3d.Scene()
scene.open(input_path)
# Set STL export options for binary format and millimeter units
export_options = a3d.stl.StlExportOptions()
import aspose.threed as a3d
def convert_glb_to_fbx(input_path: str, output_path: str):
try:
# Load GLB file
scene = a3d.Scene.from_file(input_path)
# Optional: customize FBX export options
export_options = a3d.formats.FbxSaveOptions(a3d.FileFormat.FBX7500_BINARY)
export_options.embed_textures = False # Improves performance for large models
"""
basic_cylinder
=================
Demonstrates the simplest possible approach to Create 3D Cylinder in Python
using Aspose.3D. This covers the essential API pattern you will build upon.
"""
from aspose.threed import Scene
from aspose.threed.entities import Cylinder
# ─── Step 1: Create an empty 3D scene ─────────────────────────────────────