<s> '''<STR_LIT>''' <EOL> import os <EOL> try : <EOL> import ogr <EOL> except ImportError : <EOL> from osgeo import ogr <EOL> try : <EOL> import osr <EOL> except ImportError : <EOL> from osgeo import osr <EOL> latitude = <NUM_LIT:30> <EOL> longitude = <NUM_LIT:10> <EOL> kml = '<STR_LIT>' <EOL> layer_name = '<STR_LIT>' <EOL> driver = ogr . GetDriverByName ( '<STR_LIT>' ) <EOL> data_source = driver . CreateDataSource ( kml ) <EOL> srs = osr . SpatialReference ( ) <EOL> srs . ImportFromEPSG ( <NUM_LIT> ) <EOL> layer = data_source . CreateLayer ( layer_name , srs , ogr . wkbPoint ) <EOL> field_name = ogr . FieldDefn ( "<STR_LIT:Name>" , ogr . OFTString ) <EOL> field_name . SetWidth ( <NUM_LIT> ) <EOL> layer . CreateField ( field_name ) <EOL> point = ogr . Geometry ( ogr . wkbPoint ) <EOL> point . AddPoint ( longitude , latitude ) <EOL> feature = ogr . Feature ( layer . GetLayerDefn ( ) ) <EOL> feature . SetGeometry ( point ) <EOL> feature . SetField ( "<STR_LIT:Name>" , '<STR_LIT>' ) <EOL> layer . CreateFeature ( feature ) </s>
