input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public string get proj4 description angle format format new angle format angle format ddmmss pattern false string buffer sb new string buffer sb append proj get name a a if es 0 sb append es es sb append lon 0 format format projection longitude sb null sb append lat 0 format format projection latitude sb null if false easting 1 sb append x 0 false easting if false northing 1 sb append y 0 false northing if scale factor 1 sb append k scale factor if from metres 1 sb append fr meters from metres return sb to string
|
get a string which describes this projection in proj
|
public void set min latitude double min latitude this min latitude min latitude
|
set the minimum latitude
|
public void set max latitude double max latitude this max latitude max latitude
|
set the maximum latitude
|
public void set projection latitude double projection latitude this projection latitude projection latitude
|
set the projection latitude in radians
|
public void set projection latitude degrees double projection latitude this projection latitude dtr projection latitude
|
set the projection latitude in degrees
|
public void set projection longitude double projection longitude this projection longitude normalize longitude radians projection longitude
|
set the projection longitude in radians
|
public void set projection longitude degrees double projection longitude this projection longitude dtr projection longitude
|
set the projection longitude in degrees
|
public void set true scale latitude double true scale latitude this true scale latitude true scale latitude
|
set the latitude of true scale in radians
|
public void set true scale latitude degrees double true scale latitude this true scale latitude dtr true scale latitude
|
set the latitude of true scale in degrees
|
public void set false northing double false northing this false northing false northing
|
set the false northing in projected units
|
public void set false easting double false easting this false easting false easting
|
set the false easting in projected units
|
public void set scale factor double scale factor this scale factor scale factor
|
set the projection scale factor
|
public void set from metres double from metres this from metres from metres
|
set the conversion factor from metres to projected units
|
public int get epsgcode return 0
|
returns the espg code for this projection or 0 if unknown
|
public void initialize double new scale point2 d new view origin as perceived by model set scale new scale view origin as perceived by model new view origin as perceived by model don t call update here because this method may be called before the panel has been made visible causing layer view panel create image to return null causing a null pointer exception in layer view panel update image buffer jon aquino
|
set both values but repaint once
|
public void initialize spherical e 0 0 one es 1 es rone es 1 0 one es total scale a from metres
|
initialize the projection
|
public void set schema feature schema schema this schema schema
|
a low level accessor that is not normally used
|
public feature collection get ultimate wrappee feature collection current wrappee fc while current wrappee instanceof feature collection wrapper current wrappee feature collection wrapper current wrappee fc return current wrappee
|
returns the non wrapper feature collection wrapped by this wrapper and
|
public void check not wrapping same class assert is true fc instanceof feature collection wrapper feature collection wrapper fc has wrapper get class
|
throws an assertion failed exception if this feature collection wrapper wraps
|
public boolean has wrapper class c assert is true feature collection wrapper class is assignable from c if c is instance this return true return fc instanceof feature collection wrapper feature collection wrapper fc has wrapper c
|
returns whether this feature collection wrapper or a
|
public void set attribute string attribute name object new attribute set attribute schema get attribute index attribute name new attribute
|
sets the specified attribute
|
public feature collection get wrappee return fc
|
returns the feature collection that this wrapper delegates to possibly
|
public void set geometry geometry geometry set attribute schema get geometry index geometry
|
convenience method for setting the spatial attribute
|
public object get attribute string name try return get attribute schema get attribute index name catch array index out of bounds exception e throw e
|
returns the specified attribute
|
public feature get feature int index return feature features get index
|
returns the feature at the given index zero based
|
public int get attribute index string attribute name todo reconsider attribute names are currently case sensitive i wonder whether or not this is desirable jon aquino integer index integer attribute name to index map get attribute name if index null throw new illegal argument exception unrecognized attribute name attribute name return index int value
|
returns the zero based index of the attribute with the given name
|
public boolean has attribute string attribute name return attribute name to index map get attribute name null
|
returns whether this feature schema has an attribute with this name
|
public int get integer int attribute index return integer get attribute attribute index int value
|
returns a integer attribute
|
public int get geometry index return geometry index
|
returns the attribute index of the geometry or 1 if there is no
|
public double get double int attribute index return double get attribute attribute index double value
|
returns a double attribute
|
public envelope get envelope if envelope null envelope new envelope for iterator i features iterator i has next feature feature feature i next envelope expand to include feature get geometry get envelope internal return envelope
|
because the envelope is cached the envelope may be incorrect if you
|
public string get string string attribute name return get string schema get attribute index attribute name
|
returns a string attribute
|
public attribute type get attribute type int attribute index return attribute type attribute types get attribute index
|
returns whether the attribute at the given zero based index is a string
|
public attribute type get attribute type string attribute name return get attribute type get attribute index attribute name
|
returns whether the attribute with the given name case sensitive is a string
|
public geometry get geometry return geometry get attribute schema get geometry index
|
convenience method for returning the spatial attribute
|
public int get attribute count return attribute count
|
returns the total number of spatial and non spatial attributes in this
|
public feature schema get schema return schema
|
returns the features metadata
|
public void add attribute string attribute name attribute type attribute type if attribute type geometry attribute type assert is true geometry index 1 geometry index attribute count attribute names add attribute name attribute name to index map put attribute name new integer attribute count attribute types add attribute type attribute count
|
adds an attribute with the given case sensitive name
|
public object clone return clone true
|
clones this feature
|
public boolean equals object other return this equals other false
|
returns whether the two feature schemas have the same attribute names
|
public boolean contains feature feature return features contains feature
|
returns whether or not this feature is in this collection
|
public feature clone boolean deep return clone this deep
|
clones this feature
|
public collection remove envelope env collection features query env remove all features return features
|
removes the features which intersect the given envelope
|
public feature schema set coordinate system coordinate system coordinate system this coordinate system coordinate system return this
|
sets the coordinate system associated with this feature schema but does
|
public void clear invalidate envelope features clear
|
removes all features from this collection
|
public void set attributes object attributes this attributes attributes
|
a low level accessor that is not normally used
|
public void set attribute int attribute index object new attribute attributes attribute index new attribute
|
sets the specified attribute
|
public void invalidate envelope envelope null
|
clears the cached envelope of this feature datasets features
|
public object get attribute int i return attributes i we used to eat array out of bounds exceptions here i ve removed this behaviour because array out of bounds exceptions are bugs and should be exposed jon aquino
|
returns the specified attribute
|
public feature dataset apply updates feature collection fc feature dataset fd new feature dataset fc get feature schema for iterator i fc iterator i has next feature f feature i next feature update fu feature update updates get f if fu null fd add f else fd add fu get new return fd
|
applies updates to an existing feature collection
|
public list key list return key list
|
returns the keys in order
|
public list value list return list values
|
returns the values
|
public collection values array list values new array list for iterator i key list iterator i has next object key i next values add map get key return values
|
returns the values
|
public collection values return map values
|
returns the values
|
public hash map get properties return properties
|
used by java2 xml
|
public void set properties hash map properties this properties properties
|
used by java2 xml
|
public void set header text string text header text text
|
sets the header text for the outputtemplate
|
public void set footer text string text footer text text
|
sets the footer text for the outputtemplate
|
public short read short be throws ioexception return input stream read short
|
read a 16bit short in be
|
public void set feature footer string text feature textfooter text
|
sets the footer text for the bottom of the feature
|
public short read short le throws ioexception input stream read fully work space 0 2 return short work space 1 0xff 8 work space 0 0xff
|
read a 16bit short in le
|
public int read int be throws ioexception return input stream read int
|
read a 32bit int in be
|
public int read int le throws ioexception input stream read fully work space 0 4 return work space 3 0xff 24 work space 2 0xff 16 work space 1 0xff 8 work space 0 0xff
|
read a 32bit int in le
|
public int get length geometry geometry if my shape type 21 return 10 if my shape type 11 return 14 return 18
|
calcuates the record length of this object
|
public long read long be throws ioexception return input stream read long
|
read a 64bit long in be
|
public void load java io reader r throws exception load r unknown stream
|
calls the main load method with the stream name as unknown stream
|
public long read long le throws ioexception input stream read fully work space 0 8 return long work space 7 0xff 56 long work space 6 0xff 48 long work space 5 0xff 40 long work space 4 0xff 32 long work space 3 0xff 24 long work space 2 0xff 16 long work space 1 0xff 8 long work space 0 0xff
|
read a 64bit long in le
|
public double read double be throws ioexception return input stream read double
|
read a 64bit double in be
|
public double read double le throws ioexception long l input stream read fully work space 0 8 l long work space 7 0xff 56 long work space 6 0xff 48 long work space 5 0xff 40 long work space 4 0xff 32 long work space 3 0xff 24 long work space 2 0xff 16 long work space 1 0xff 8 long work space 0 0xff return double long bits to double l
|
read a 64bit double in le
|
private string get line buffered reader br throws exception line number return br read line
|
gets a line from the input stream
|
public int skip bytes int num throws ioexception return input stream skip bytes num
|
skip ahead in the stream
|
public int get shape type return my shape type
|
returns the shapefile shape type value for a point
|
public string as string string result int t result header text n n for t 0 t feature text size t result result feature text get t coding text get t result result feature textfooter result result n n result result footer text return result
|
for debugging return a human readable version of the parsed outputtemplate
|
public int get length geometry geometry multi point mp multi point geometry if my shape type 8 return mp get num geometries 8 20 if my shape type 28 return mp get num geometries 8 20 8 4 mp get num geometries return mp get num geometries 8 20 8 4 mp get num geometries 8 4 mp get num geometries
|
calcuates the record length of this object
|
private boolean validop string op string op2 op2 new string op op2 op2 trim op2 op2 to lower case if op2 starts with op2 length 2 return false op2 op2 substring 1 op2 op2 trim return op2 starts with column op2 starts with geometry
|
returns true if the intput string is a valid op for error checking
|
public feature collection read reader reader throws exception feature schema feature schema new feature schema feature schema add attribute geometry attribute type geometry feature collection feature collection new feature dataset feature schema buffered reader buffered reader new buffered reader reader try while is at end of file buffered reader feature collection add next feature buffered reader feature schema finally buffered reader close return feature collection
|
reads in the actual wkt geometries
|
public driver properties set string key string value set property key value return this
|
sets a key value pair in the object
|
public void set output template gmloutput template ot output template ot
|
attaches a gmlouput template
|
public string get last update string date last update d last update m last update y return date
|
returns the date of the last update of the file as a string
|
public int get last rec return last rec
|
returns the number of records in the database file
|
public string get last update string date last update d last update m 1 1900 last update y return date
|
returns the date of the last update of the file as a string
|
public string write geometry geometry writer sw new string writer try write formatted geometry false sw catch ioexception ex assert should never reach here return sw to string
|
converts a code geometry code to its well known text representation
|
public void write short be int s throws ioexception output stream write short s
|
write a 16bit short in big endian
|
public int get num fields return numfields
|
returns the number of fields in the records in the database file
|
public void write short le int s throws ioexception output stream write byte s output stream write byte s 8
|
write a 16bit short in little endian
|
public void write int be int i throws ioexception output stream write int i
|
write a 32bit int in big endian
|
public void write geometry geometry writer writer throws ioexception write formatted geometry false writer
|
converts a code geometry code to its well known text representation
|
public void write int le int i throws ioexception output stream write byte i output stream write byte i 8 output stream write byte i 16 output stream write byte i 24
|
write a 32bit int in little endian
|
public void write long be long l throws ioexception output stream write long l
|
write a 64bit long in big endian
|
public void write long le long l throws ioexception output stream write byte byte l output stream write byte byte l 8 output stream write byte byte l 16 output stream write byte byte l 24 output stream write byte byte l 32 output stream write byte byte l 40 output stream write byte byte l 48 output stream write byte byte l 56
|
write a 64bit long in little endian
|
public string write formatted geometry geometry writer sw new string writer try write formatted geometry true sw catch ioexception ex assert should never reach here return sw to string
|
same as code write code but with newlines and spaces to make the
|
public void write double be double d throws ioexception output stream write double d
|
write a 64bit double in big endian
|
public void write double le double d throws ioexception this write long le double double to long bits d
|
write a 64bit double in little endian
|
public int get field number string name for int i 0 i numfields i logger info i if name equals ignore case fielddef i fieldname to string return i return 1 not found
|
looks up the field number for the given named column
|
public int get file size return filesize
|
returns the size of the database file
|
public dbf file header endian data input stream file throws ioexception get dbf file header file
|
reads the header of a dbf file
|
public string buffer get next dbf rec throws java io ioexception string buffer record new string buffer rec size numfields for int i 0 i rec size i we could do some checking here record append char r file read unsigned byte return record
|
gets the next record and returns it as a string
|
public string buffer get next dbf rec throws java io ioexception return records position
|
gets the next record and returns it as a string
|
public string buffer get dbf rec int row throws java io ioexception string buffer record new string buffer rec size numfields r file seek data offset rec size row multi byte character modification thanks to hisaji ono byte strbuf new byte rec size byte array buffer fo storing string s byte data d file read byte lenum strbuf record append new string strbuf append byte array to string buffer record append strbuf return record
|
fetches the i row i th row of the file
|
public void set type attribute type t todo design shouldn t we use the assert class to stipulate that t must not be null jon aquino if t null type attribute type string else type t
|
sets the jcs type of this column
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.