{"id":15107744,"url":"https://github.com/pharo-gis/shapes","last_synced_at":"2026-03-14T23:31:30.276Z","repository":{"id":28119386,"uuid":"31618351","full_name":"pharo-GIS/Shapes","owner":"pharo-GIS","description":"Smalltalk package to read and view GIS data in ESRI shapefile format","archived":false,"fork":false,"pushed_at":"2024-02-25T17:41:37.000Z","size":124,"stargazers_count":7,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-25T21:41:14.314Z","etag":null,"topics":["esri","gis","natural-earth-vector","pharo","pharo-smalltalk","shapefile","smalltalk"],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pharo-GIS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-03T20:00:15.000Z","updated_at":"2023-07-06T02:28:00.000Z","dependencies_parsed_at":"2024-09-20T15:32:10.561Z","dependency_job_id":"a78f3fbf-b439-4b1a-a7b4-b0be9e081f3f","html_url":"https://github.com/pharo-GIS/Shapes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-GIS%2FShapes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-GIS%2FShapes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-GIS%2FShapes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-GIS%2FShapes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pharo-GIS","download_url":"https://codeload.github.com/pharo-GIS/Shapes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871956,"owners_count":16554471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esri","gis","natural-earth-vector","pharo","pharo-smalltalk","shapefile","smalltalk"],"created_at":"2024-09-25T21:41:22.602Z","updated_at":"2025-10-23T02:31:36.302Z","avatar_url":"https://github.com/pharo-GIS.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\nSmalltalk package to read and view GIS data in ESRI Shapefile format, [originally written](http://www.squeaksource.com/shapes.html) by Hans Baveco and forked to work with Pharo. \n\n# Installation\n\n```smalltalk\nEpMonitor disableDuring: [ \n    Metacello new\n        onWarningLog;\n        repository: 'github://pharo-GIS/Shapes/repository';\n        baseline: 'Shapes';\n        load ].\n```\n\n# Usage\n\nYou can try it with your own .shp files or download a [sample data set](https://github.com/nvkelso/natural-earth-vector/tree/v5.1.1/) from Natural Earth project using the following example:\n\n```smalltalk\n| shpE legend urlRoot urlESRIFilePrefix urlESRIFileShp urlPath response fileRef |\n\n\" Download Shapefile resources \"\nurlRoot := 'https://github.com/nvkelso/natural-earth-vector/tree/v5.1.1/110m_cultural/'.\nurlESRIFilePrefix := 'ne_110m_populated_places'.\nurlESRIFileShp := urlESRIFilePrefix , '.shp'.\nurlPath := urlRoot , urlESRIFilePrefix.\n\n#('.shx' '.dbf' '.shp' '.cpg' '.prj') do: [ : ext |\n  ZnClient new\n   url: (urlPath , ext) asZnUrl;\n   queryAt: 'raw' put: 'true';\n   numberOfRetries: 2;\n   enforceHttpSuccess: true;\n   downloadTo: urlESRIFilePrefix , ext;\n   get ].\n\n\" Load and display it in Morphic \"\nshpE := ShapeEnsemble fromFile: urlESRIFileShp.\n\" List data fields \"\nshpE dataFields inspect.\n\" List all shape records \"\nshpE shapeRecords inspect.\n\" Set the current attribute \"\nshpE attribute: 'NAME'.\n\nlegend := ColorLegend mapValuesToRandom: shpE valuesOfCurrentAttribute.\nshpE legend: legend.\n\nshpE displayMorphic.\n```\n\nIf you already downloaded the files in your Pharo working directory:\n\n```smalltalk\n| urlESRIFilePrefix urlESRIFileShp shpE legend |\nurlESRIFileShp := FileSystem workingDirectory / 'natural-earth-vector/10m_cultural/ne_10m_admin_0_countries.shp'.\nshpE := ShapeEnsemble fromFile: urlESRIFileShp.\nshpE attribute: 'CONTINENT'.\nlegend := ColorLegend mapValuesToRandom: shpE valuesOfCurrentAttribute.\nshpE legend: legend.\nshpE displayMorphic\n```\n\n# Sample outputs\n\nFollows some example outputs using different attributes for the NaturalEarth data set:\n\n## CONTINENT\n\n![an ImageMorph(55801344)](https://user-images.githubusercontent.com/4825959/83931348-95d38880-a772-11ea-9ffe-1549abc50857.png)\n\n## SUBREGION\n\n![an ImageMorph(705029120)](https://user-images.githubusercontent.com/4825959/83931353-9835e280-a772-11ea-9a62-f5fdefbb5a6a.png)\n\n## REGION_UN\n\n![an ImageMorph(911508224)](https://user-images.githubusercontent.com/4825959/83931355-98ce7900-a772-11ea-8560-7f75d628cb69.png)\n\n## NAME_LONG\n\n![an ImageMorph(1002761984)](https://user-images.githubusercontent.com/4825959/83931358-99ffa600-a772-11ea-80b3-2dae633ec0ba.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-gis%2Fshapes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpharo-gis%2Fshapes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-gis%2Fshapes/lists"}