{"id":20198118,"url":"https://github.com/osgeo/ows.js","last_synced_at":"2025-04-10T10:45:31.618Z","repository":{"id":19233821,"uuid":"22468544","full_name":"OSGeo/ows.js","owner":"OSGeo","description":"OGC Web Services Library for JavaScript","archived":false,"fork":false,"pushed_at":"2019-01-23T15:10:53.000Z","size":294,"stargazers_count":29,"open_issues_count":6,"forks_count":19,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-01T11:44:31.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/OSGeo/ows.js","language":"JavaScript","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/OSGeo.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}},"created_at":"2014-07-31T12:29:05.000Z","updated_at":"2024-01-09T15:31:52.000Z","dependencies_parsed_at":"2022-08-01T03:18:50.787Z","dependency_job_id":null,"html_url":"https://github.com/OSGeo/ows.js","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSGeo%2Fows.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSGeo%2Fows.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSGeo%2Fows.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSGeo%2Fows.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OSGeo","download_url":"https://codeload.github.com/OSGeo/ows.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248201061,"owners_count":21064029,"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":[],"created_at":"2024-11-14T04:29:26.675Z","updated_at":"2025-04-10T10:45:31.598Z","avatar_url":"https://github.com/OSGeo.png","language":"JavaScript","readme":"#ows.js\n\n[![Build Status](https://travis-ci.org/OSGeo/ows.js.png?branch=master)](https://travis-ci.org/OSGeo/ows.js)\n\nOGC Web Services Library for JavaScript.\n\n\u003e This Library is based in the awesome work of [Jsonix](https://github.com/highsource/jsonix) \u0026 [ogc-schemas](https://github.com/highsource/ogc-schemas) libraries.\n\n#### Implemented so far\n\n- Basic Ows operations (ex: GetCapabilities)\n- CSW\n    - GetRecords\n    - GetRecordById\n    - GetDomain\n    - GetCapabilities (Refactored)\n    - Transactions:\n        - Create\n        - Update\n        - Delete\n  \n- OGC Filters\n   - Operators:\n       - Logical Operators:\n           - AND\n           - OR\n   - Spatial Operatos:\n       - BBOX\n   - Comparison\n       - isLike\n       - isBetween\n       - isEqualTo\n       - isLessThanOrEqualTo\n       - isGreaterThan\n       - isLessThan\n       - isGreaterThanOrEqualTo\n       - isNotEqualTo\n\n\n#### Next TODOS\n\n- Clean Ows.js deprecated code.\n- Implement NOT operator.\n- PropertyIsNull\n- Improve Unit-Tests (Help is extremely Welcome here :D)\n- DescribeRecord\n\n#### in the Future\n\n- WPS\n- WFS\n- SLD\n- etc...\n\n## Getting started\n\n### How to install ows.js in your project.\n\nIt is recommended to use bower, because this project depends on Jsonix and Ogc-schemas libraries.\n\n```bash\n bower install ows.js --save\n```\n\n### Using and configure CSW\n\nThe CSW standard strongly depends on catalogues profiles. So first you need to determine what profile you want to use and include its depencies:\n\n####Basic CSW\n\nInclude in you project:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"../bower_components/ogc-schemas/lib/OWS_1_0_0.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../bower_components/ogc-schemas/lib/DC_1_1.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../bower_components/ogc-schemas/lib/DCT.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../bower_components/w3c-schemas/lib/XLink_1_0.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../bower_components/ogc-schemas/lib/CSW_2_0_2.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../bower_components/ogc-schemas/lib/Filter_1_1_0.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../bower_components/ogc-schemas/lib/GML_3_1_1.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../bower_components/ogc-schemas/lib/SMIL_2_0_Language.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../bower_components/ogc-schemas/lib/SMIL_2_0.js\"\u003e\u003c/script\u003e\n```\n\nConfigure CSW:\n\n```javascript\nvar cswConfig = [\n            [\n                OWS_1_0_0,\n                DC_1_1,\n                DCT,\n                XLink_1_0,\n                SMIL_2_0,\n                SMIL_2_0_Language,\n                GML_3_1_1,\n                Filter_1_1_0,\n                CSW_2_0_2,\n                GML_3_1_1\n            ],\n            {\n                namespacePrefixes: {\n                    'http://www.opengis.net/cat/csw/2.0.2': 'csw',\n                    \"http://www.opengis.net/ogc\": 'ogc',\n                    \"http://www.opengis.net/gml\": \"gml\",\n                    \"http://purl.org/dc/elements/1.1/\":\"dc\",\n                    \"http://purl.org/dc/terms/\":\"dct\"\n                },\n                mappingStyle : 'simplified'\n            }\n        ];\n```\n\n####ISO 19139 (implementation of 19115)\n\nInclude in you project:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/OWS_1_0_0.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/DC_1_1.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/DCT.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/w3c-schemas/lib/XLink_1_0.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/CSW_2_0_2.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/Filter_1_1_0.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/GML_3_1_1.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/SMIL_2_0_Language.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/SMIL_2_0.js\"\u003e\u003c/script\u003e\n\u003c!-- ISO Profile --\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/GML_3_2_0.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/ISO19139_GCO_20060504.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/ISO19139_GMD_20060504.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/ISO19139_GTS_20060504.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/ISO19139_GSS_20060504.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/ISO19139_GSR_20060504.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/ISO19139_GMX_20060504.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"../node_modules/ogc-schemas/lib/ISO19139_SRV_20060504.js\"\u003e\u003c/script\u003e\n```\n\nConfigure CSW:\n\n```javascript\nvar cswConfig = [\n            [\n                OWS_1_0_0,\n                DC_1_1,\n                DCT,\n                XLink_1_0,\n                SMIL_2_0,\n                SMIL_2_0_Language,\n                GML_3_1_1,\n                Filter_1_1_0,\n                CSW_2_0_2,\n                GML_3_2_0,\n                ISO19139_GSS_20060504,\n                ISO19139_GSR_20060504,\n                ISO19139_GTS_20060504,\n                ISO19139_GMD_20060504,\n                ISO19139_GCO_20060504,\n                ISO19139_SRV_20060504\n            ],\n            {\n                namespacePrefixes: {\n                    \"http://www.opengis.net/cat/csw/2.0.2\": \"csw\",\n                    \"http://www.opengis.net/ogc\": 'ogc',\n                    \"http://www.opengis.net/gml\": \"gml\",\n                    \"http://purl.org/dc/elements/1.1/\":\"dc\",\n                    \"http://purl.org/dc/terms/\":\"dct\",\n                    \"http://www.isotc211.org/2005/gmd\" : \"gmd\",\n                    \"http://www.isotc211.org/2005/gco\" : \"gco\",\n                },\n                mappingStyle : 'simplified'\n            }\n        ];\n```\n\n#### Make a request\n\n**Simple**\n\n```javascript\nvar cswConfig = ..... ; //\nvar csw = new Ows4js.Csw('http://youcatalogueurl/', cswConfig);\n\ncsw.GetRecords(1,10).then(function(result){\n    console.log(result);\n});\n\n```\n\n**With a ogc-filter**\n\n```javascript\nvar cswConfig = ..... ; //\nvar csw = new Ows4js.Csw('http://youcatalogueurl/', cswConfig);\n \nvar filter = new Ows4js.Filter().PropertyName('dc:title').isLike('%water%');\nfilter = filter.and(new Ows4js.Filter().PropertyName('dc:subject').isLike('%polution%'));\nfilter = filter.and(new Ows4js.Filter().BBOX(-80, 150, 80, -150, 'urn:x-ogc:def:crs:EPSG:6.11:4326'));\n\n\ncsw.GetRecords(1,10, filter).then(function(result){\n    console.log(result);\n});\n```\n \n### Developer Zone\n\n#### Clone de repository and install dependencies\n\n```bash\ngit clone https://github.com/juanmav/ows.js.git\ncd ows.js/\nnpm install\n```\n\n**run the example project**\n```bash\ngrunt serve\n```\n\n**Go to the browser and open the dev console**\n\n- [http://127.0.0.1:9000/examples/](http://127.0.0.1:9000/examples/)\n- Press F12 (Chrome \u0026 Firefox)\n\n#### How to build ows.min.js\n\n```bash\ngrunt dist\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosgeo%2Fows.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosgeo%2Fows.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosgeo%2Fows.js/lists"}