@vertigis/arcgis-extensions 51.12.0 → 51.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/convert.d.ts +24 -0
- package/data/convert.js +1 -1
- package/data/support/_dxfConverters.d.ts +538 -0
- package/data/support/_dxfConverters.js +1 -0
- package/data/support/_dxfFunctions.d.ts +82 -0
- package/data/support/_dxfFunctions.js +1 -0
- package/data/support/_dxfInterfaces.d.ts +913 -0
- package/data/support/_dxfInterfaces.js +1 -0
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/data_support__dxfConverters.DxfEntityProcessor.html +31 -0
- package/docs/html/classes/data_support__dxfConverters.DxfToGeoJsonInsertBlockMapper.html +29 -0
- package/docs/html/classes/data_support__dxfConverters.DxfToGeoJsonLineMapper.html +12 -0
- package/docs/html/classes/data_support__dxfConverters.DxfToGeoJsonPolygonMapper.html +21 -0
- package/docs/html/classes/data_support__dxfConverters.DxfToGeoJsonTextMapper.html +28 -0
- package/docs/html/functions/data_convert.dxfToLayerExtensions.html +7 -0
- package/docs/html/functions/data_support__dxfConverters.mapDXFLineTypeToEsri.html +13 -0
- package/docs/html/functions/data_support__dxfFunctions.deriveAnnotationMinScale.html +7 -0
- package/docs/html/functions/data_support__dxfFunctions.intToRGB.html +4 -0
- package/docs/html/functions/data_support__dxfFunctions.mapBasicLineType.html +5 -0
- package/docs/html/functions/data_support__dxfFunctions.mapDXFLineTypeToEsri.html +6 -0
- package/docs/html/functions/data_support__dxfFunctions.mapIsoPatterns.html +4 -0
- package/docs/html/functions/data_support__dxfFunctions.mapLineTypePattern.html +5 -0
- package/docs/html/functions/data_support__dxfFunctions.normalizeFillStyle.html +4 -0
- package/docs/html/functions/data_support__dxfFunctions.normalizeLineOutline.html +8 -0
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/interfaces/data_convert.DxfToLayerExtensionsOptions.html +6 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.DxfBlock.html +15 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.DxfEntity.html +42 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.DxfJsonComponentProperties.html +18 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.DxfPoint.html +8 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.DxfScale.html +9 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IAttDefEntity.html +22 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IBaseTable.html +6 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IDxfData.html +10 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IDxfJsonComponentContext.html +62 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.ILayer.html +12 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.ILayerTypesTable.html +8 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.ILayersTable.html +8 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.ILineEntityExtended.html +4 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.ILineType.html +10 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.ILwpolylineEntityExtended.html +4 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IMTextEntity.html +18 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IPolylineEntityExtended.html +6 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.ITables.html +8 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.ITextEntityExtended.html +18 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IViewPort.html +50 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IViewPortTable.html +8 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.LineStyle.html +4 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.RendererPolygonEntry.html +12 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.SimpleFillSymbolJSON.html +12 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.SimpleMarkerSymbolDXF.html +10 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.TextGraphicAttr.html +15 -0
- package/docs/html/modules/data_convert.html +2 -0
- package/docs/html/modules/data_support__dxfConverters.html +7 -0
- package/docs/html/modules/data_support__dxfFunctions.html +11 -0
- package/docs/html/modules/data_support__dxfInterfaces.html +30 -0
- package/docs/html/modules.html +3 -0
- package/docs/html/types/data_support__dxfFunctions.SimpleFillStyle.html +2 -0
- package/docs/html/types/data_support__dxfInterfaces.RendererObjectLine.html +9 -0
- package/docs/html/types/data_support__dxfInterfaces.RendererObjectPoint.html +5 -0
- package/docs/html/types/data_support__dxfInterfaces.RendererObjectPolygon.html +11 -0
- package/docs/html/variables/data_support__dxfFunctions.VALID_FILL_STYLES.html +1 -0
- package/docs/html/variables/version.version.html +1 -1
- package/package.json +3 -1
- package/utilities/_project.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mapDXFLineTypeToEsri(t,e){if(!t)return"solid";const o=t.toUpperCase(),n=mapBasicLineType(o,e?.pattern?.map((t=>parseFloat(t))));if(n)return n;const r=mapIsoPatterns(o);if(r)return r;const a=mapLineTypePattern(e);return a||"solid"}export function mapBasicLineType(t,e){if(!t)return;const o=t.toUpperCase().trim(),n={BYLAYER:"solid",BYBLOCK:"solid",CONTINUOUS:"solid",HIDDEN:"dash",DASHED:"dash",DASHEDX2:"dash",DASHED2:"dash",CENTER:"dash-dot",CENTERX2:"dash-dot",CENTER2:"dash-dot",DASHDOT:"dash-dot",DOTTED:"dot",DIVIDE:"short-dash",DIVIDEX2:"short-dash-dot",DIVIDE2:"short-dash-dot"};if(n[o])return n[o];if(e?.length){const t=Math.abs(e[0]??0),o=Math.abs(e[1]??0);if(2===e.length)return t<8&&o<6?"short-dash":t>=8&&t<=15&&o>=6&&o<=15?"dash":"long-dash";if(4===e.length)return t<6&&o<6?"short-dash-dot":t>=6&&t<=15&&o>=6&&o<=15?"dash-dot":"long-dash-dot"}}export function mapIsoPatterns(t){const e=t.toUpperCase();return e.includes("LONG")?"long-dash":e.includes("DOUBLE")?"long-dash-dot":e.includes("PHANTOM")?"dash-dot":void 0}export function mapLineTypePattern(t){if(t?.pattern&&Array.isArray(t.pattern)){const e=t.pattern,o=e.some((t=>parseFloat(t)>.2)),n=e.some((t=>0===parseFloat(t)));return o&&!n?"dash":!o&&n?"dot":o&&n?"dash-dot":"solid"}}export function intToRGB(t){if(t>=1&&t<=255)return{1:[255,0,0,1],2:[255,255,0,1],3:[0,255,0,1],4:[0,0,255,1],5:[255,0,255,1],6:[0,255,255,1],7:[255,255,255,1]}[t]||[0,0,0,1];const e=t>>16&255,o=t>>8&255,n=255&t;return 255===e&&255===o&&255===n?[0,0,0,1]:[e,o,n,1]}export const VALID_FILL_STYLES=["backward-diagonal","cross","diagonal-cross","forward-diagonal","horizontal","none","solid","vertical"];export function normalizeFillStyle(t){if("string"!=typeof t)return"solid";const e=t.toLowerCase();if(VALID_FILL_STYLES.includes(e))return e;if(e.startsWith("esrisfs")){const t=e.replace(/^esrisfs/,"").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/_/g,"-").replace(/^[^a-z0-9]+/g,"").toLowerCase(),o="undefined"===t?"none":t;if(VALID_FILL_STYLES.includes(o))return o}return"solid"}export function normalizeLineOutline(t){return{type:"simple-line",color:t?.color??[0,0,0],width:t?.width??1.5}}export function deriveAnnotationMinScale(t,e,o){if(!t||0===e)return 0;const n=Math.max(t.width,t.height),r=Math.max(1,Math.sqrt(e/100));let a=2*n*Math.max(.5,Math.min(o/12,3))/r;return a=Math.max(1e3,Math.min(a,2e7)),Math.round(a)}
|