Skip to content

Commit

Permalink
EditData
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderJuestel committed Jan 25, 2024
1 parent 7fb9ce5 commit 3351378
Show file tree
Hide file tree
Showing 6 changed files with 3,160 additions and 69 deletions.
51 changes: 50 additions & 1 deletion docs/source/notebooks/04_Adding_Well_Logs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@
{
"data": {
"text/plain": [
"False"
"True"
]
},
"execution_count": 14,
Expand Down Expand Up @@ -1334,6 +1334,55 @@
"id": "c03581e3-a056-4bfd-9d82-8b0017b9a201",
"metadata": {},
"outputs": [],
"source": [
"borehole"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e0a1a945-3cb2-4f61-9b52-ea5b9031d931",
"metadata": {},
"outputs": [],
"source": [
"borehole.crs_pyproj.srs"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "b282e7bb-a6a1-4d32-9fde-74d9935b8a43",
"metadata": {},
"outputs": [
{
"ename": "TypeError",
"evalue": "The CRS of the borehole location must be provided as string or pyproject CRS",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[16], line 7\u001b[0m\n\u001b[0;32m 3\u001b[0m borehole \u001b[38;5;241m=\u001b[39m Borehole(name\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mWeisweiler R1\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m 5\u001b[0m borehole\u001b[38;5;241m.\u001b[39minit_properties(location\u001b[38;5;241m=\u001b[39m(\u001b[38;5;241m6.313031\u001b[39m, \u001b[38;5;241m50.835676\u001b[39m),\n\u001b[0;32m 6\u001b[0m crs\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mEPSG:4326\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m----> 7\u001b[0m \u001b[43mborehole\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mupdate_value\u001b[49m\u001b[43m(\u001b[49m\u001b[43mattribute\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mlocation\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m6\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m50\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcrs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m4326\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\n",
"File \u001b[1;32m~\\Documents\\pybore\\pyborehole\\borehole.py:878\u001b[0m, in \u001b[0;36mBorehole.update_value\u001b[1;34m(self, attribute, value, crs, transform_coordinates)\u001b[0m\n\u001b[0;32m 876\u001b[0m \u001b[38;5;66;03m# Checking that the crs is provided as string or pyproj CRS\u001b[39;00m\n\u001b[0;32m 877\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(crs, (\u001b[38;5;28mstr\u001b[39m, pyproj\u001b[38;5;241m.\u001b[39mcrs\u001b[38;5;241m.\u001b[39mcrs\u001b[38;5;241m.\u001b[39mCRS, \u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28;01mNone\u001b[39;00m))):\n\u001b[1;32m--> 878\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mThe CRS of the borehole location must be provided as string or pyproject CRS\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m 880\u001b[0m \u001b[38;5;66;03m# Checking that the transform_coordinates is provided as bool\u001b[39;00m\n\u001b[0;32m 881\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(transform_coordinates, (\u001b[38;5;28mbool\u001b[39m, \u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28;01mNone\u001b[39;00m))):\n",
"\u001b[1;31mTypeError\u001b[0m: The CRS of the borehole location must be provided as string or pyproject CRS"
]
}
],
"source": [
"from pyborehole.borehole import Borehole\n",
"\n",
"borehole = Borehole(name='Weisweiler R1')\n",
"\n",
"borehole.init_properties(location=(6.313031, 50.835676),\n",
" crs='EPSG:4326')\n",
"borehole.update_value(attribute='location', value=(6, 50), crs=[4326])\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cce9fc9c-e83c-4828-80fa-191eb35c1508",
"metadata": {},
"outputs": [],
"source": []
}
],
Expand Down
Loading

0 comments on commit 3351378

Please sign in to comment.