---
title: "classifyRings | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Function classifyRings

-   classifyRings<[T](#classifyringst) extends [Point2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Point2D/)\>(  
        rings: [RingWithArea](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.RingWithArea/)<[T](#classifyringst)\>\[\],  
        maxRings?: number,  
    ): [RingWithArea](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.RingWithArea/)<[T](#classifyringst)\>\[\]\[\][](#classifyrings)
    
    Classifies an array of rings into polygons with outer rings and holes
    
    #### Type Parameters
    
    -   T extends [Point2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Point2D/)
    
    #### Parameters
    
    -   rings: [RingWithArea](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.RingWithArea/)<[T](#classifyringst)\>\[\]
        
        the rings to classify
        
    -   `Optional`maxRings: number
        
        the maximum number of rings to include in a polygon, use 0 to include all rings
        
    
    #### Returns [RingWithArea](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.RingWithArea/)<[T](#classifyringst)\>\[\]\[\]
    
    an array of polygons with internal rings as holes
