NYSentencing

§ 140.00  Criminal trespass and burglary; definitions of terms.
  The following definitions are applicable to this article:
  1.   "Premises"  includes the term "building", as defined herein, and any
real property.
  2.   "Building,"  in  addition  to  its  ordinary  meaning,  includes any
structure, vehicle or watercraft used for overnight lodging of persons,  or
used  by persons for carrying on business therein, or used as an elementary
or secondary school, or an inclosed motor truck, or an inclosed motor truck
trailer.  Where a building consists of two or more units separately secured
or occupied, each unit shall be deemed both a separate building  in  itself
and a part of the main building.
  3.   "Dwelling"  means  a  building which is usually occupied by a person
lodging therein at night.
  4.  "Night" means the period between thirty minutes after sunset and
thirty minutes before sunrise.
  5.    "Enter   or  remain  unlawfully."   A  person  "enters  or  remains
unlawfully" in or upon premises when he is not licensed or privileged to do
so.   A  person who, regardless of his intent, enters or remains in or upon
premises which are at the time open to the public does so with license  and
privilege  unless  he  defies  a  lawful  order  not  to  enter  or remain,
personally communicated to him by the  owner  of  such  premises  or  other
authorized person.  A license or privilege to enter or remain in a building
which is only partly open to the public is not a license  or  privilege  to
enter  or  remain  in  that  part  of the building which is not open to the
public.  A person who enters or  remains  upon  unimproved  and  apparently
unused  land,  which  is  neither fenced nor otherwise enclosed in a manner
designed to exclude intruders, does so with license  and  privilege  unless
notice  against  trespass is personally communicated to him by the owner of
such land or other authorized person, or unless such  notice  is  given  by
posting  in  a  conspicuous  manner.   A person who enters or remains in or
about a school building without written permission from someone  authorized
to  issue  such  permission or without a legitimate reason which includes a
relationship involving custody of or responsibility for a pupil or  student
enrolled in the school or without legitimate business or a purpose relating
to the operation of the school does so without license and privilege.