The "importwellheads" web service imports a CSV well head into the specified datasource.
A typical URL is http://myserver.mycompany.com:8080/INTGeoServer/api/ds/{datasourcetype}/v1/sources/{datasource}/wellheads/import with the POST method.
where
datasourcetype: type of a datasource, i.e. mongo, s3, etc.
datasource: unique id of a datasource
The following parameters are available:
importoptions : a JSON object representing import options. The following parameters are available:
delimiter is the character delimiter, if not specified then "," will be used (does not work with 'whitespace and tab' option)
headerNameRow is the 1 based index of row where header first appears. This is an optional parameter.
dataValuesRow is the 1 based index of row where data first appears
importType: specified an import type, i.e. overwrite, update, etc
columnmappings : a JSON array representing well head data. The following parameters are available:
columnIndex is the 1 based index of column
mappingID is the column mappings id.
dataType is the data type of a column: string, double, long or date. This is an optional paramter.
unit: is a unit of measurement of a column. This is an optional parameter.
isWellMappingColumn: indicates whether this column will be used to map wells
locationoptions : Json representing location of well
file: a file containing a being imported well head. This is required parameter.
All row and column indices start at 1.
An example import is shown below (pass multipart/form-data as Content-Type):
importoptions:
{
"delimiter":",",
"dataValuesRow":5,
"headerNameRow":3,
"importType":"Overwrite"
}
columnmappings:
[
{
"mappingID":"WellName",
"columnIndex":1,
"dataType":"String",
"unit":""
},
{
"mappingID":"Surface X",
"columnIndex":2,
"dataType":"Double",
"unit":""
},
{
"mappingID":"Surface Y",
"columnIndex":3,
"dataType":"Double",
"unit":""
},
{
"mappingID":"Surface Latitude",
"columnIndex":4,
"dataType":"String",
"unit":""
},
{
"mappingID":"Surface Longitude",
"columnIndex":5,
"dataType":"String",
"unit":""
},
{
"mappingID":"KB",
"columnIndex":6,
"dataType":"Double",
"unit":""
},
{
"mappingID":"Permanent Datum",
"columnIndex":7,
"dataType":"String",
"unit":""
},
{
"mappingID":"Water Depth",
"columnIndex":8,
"dataType":"Double",
"unit":""
},
{
"mappingID":"Total Depth (MD)",
"columnIndex":9,
"dataType":"Double",
"unit":""
},
{
"mappingID":"Operator",
"columnIndex":10,
"dataType":"String",
"unit":""
},
{
"mappingID":"Well Designation",
"columnIndex":11,
"dataType":"String",
"unit":""
},
{
"mappingID":"Coordinate System",
"columnIndex":12,
"dataType":"String",
"unit":""
},
{
"mappingID":"Reservoir Objective",
"columnIndex":13,
"dataType":"String",
"unit":""
},
{
"mappingID":"Well Type",
"columnIndex":14,
"dataType":"String",
"unit":""
},
{
"mappingID":"Province",
"columnIndex":15,
"dataType":"String",
"unit":""
},
{
"mappingID":"Country",
"columnIndex":16,
"dataType":"String",
"unit":""
},
{
"mappingID":"Permit",
"columnIndex":17,
"dataType":"String",
"unit":""
},
{
"mappingID":"Rig Contractor",
"columnIndex":18,
"dataType":"String",
"unit":""
},
{
"mappingID":"Drilling Rig",
"columnIndex":19,
"dataType":"String",
"unit":""
},
{
"mappingID":"Rig Type",
"columnIndex":20,
"dataType":"String",
"unit":""
},
{
"mappingID":"Spud Date",
"columnIndex":21,
"dataType":"String",
"unit":""
}
]
locationoptions:
{
"xColumnIndex":2,
"yColumnIndex":3,
"elevationColumnIndex":6,
"elevationUnitSymbol":"m",
"epsgCode":"28351"
}