Difference between revisions of "Sf geo number"

From ARK
Jump to: navigation, search
 
(Additional Fields)
 
Line 3: Line 3:
  
 
===Additional Fields===
 
===Additional Fields===
'op_gml_location' - this is where the resultant GML file should be saved
+
*'op_gml_location' - this is where the resultant GML file should be saved
'op_coord_fields'  - an array containing two properly setup number fields. The first one in the array is taken to be easting, 2nd is northing
+
*'op_coord_fields'  - an array containing two properly setup number fields. The first one in the array is taken to be easting, 2nd is northing
'op_projection' - the projection of the coords in EPSG format (e.g. "EPSG:27700" for British National Grid).  
+
*'op_projection' - the projection of the coords in EPSG format (e.g. "EPSG:27700" for British National Grid).
  
 
===Example Configuration===
 
===Example Configuration===

Latest revision as of 10:47, 13 July 2009

Description

The sf_geo_number is a subform for handling coordinate pairs. You can add two number fields to the form representing and x and a y coordinate and then the form will add the numbers to the database and also create a GML file containing all the coord pairs for that itemkey.

Additional Fields

  • 'op_gml_location' - this is where the resultant GML file should be saved
  • 'op_coord_fields' - an array containing two properly setup number fields. The first one in the array is taken to be easting, 2nd is northing
  • 'op_projection' - the projection of the coords in EPSG format (e.g. "EPSG:27700" for British National Grid).

Example Configuration

$conf_mcd_geography =
    array(
        'view_state' => 'max',
        'edit_state' => 'view',
        'sf_nav_type' => 'full',
        'sf_title' => 'geography', 
        'sf_html_id' => 'job_geography', // Must be unique
        'script' => 'php/subforms/sf_geo_number.php',
        'op_label' => 'space',
        'op_input' => 'save',
        'fields' => array(
             $conf_field_easting,
             $conf_field_northing
         ),
         'op_gml_location' => "$ark_server_path\data\mapping\job_pt.gml",
         'op_coord_fields' => array(
              $conf_field_easting,
              $conf_field_northing
          ),
          'op_projection' => 'EPSG:27700'
    );