Your question is very detailed and clear, however this is a national list serve and unless a local New York attorney responds you are not likely to get the answer you need. I suggest contacting a lawyer in your area, or you might also try going to the City planning and development department with your question. The planning department is paid for by your tax dollars and thier answers are free. The only reason you might not take to the planning department would be if you are certain you are going through with the project, and you think there is a chance they will deny the project and you don't want them to know about it until you have everything in order with your attorney.
First - you need to contact an attorney licensed in NY to help you. Second - you probably should consult a licensed contractor and discuss your goals. In trying to accomplish your goal, you will find yourself dealing with your local planning office (zoning) and building department (building codes). From your description, you may also need to deal with whatever utility department/company provides utilities to the structure. Prepare for frustration and expect decisions by your local government to take a long time. This could be an arduous task.
I am licensed to practice law in the State of Florida only. My answers on Avvo.com are intended only to provide the most basic answers possible to questions posed and are not intended to provide legal advice in any way. Never depend solely on my answers or only on information provided on Avvo.com. Proper legal advice can only be given through in depth consultation with a licensed attorney. When seeking legal advice, always seek advice from an attorney licensed to practice law in your state. Every case is different and my answers here are not intended to serve as legal advice. By answering your question, I hope to provide you, the questioner, with a starting point for examining your legal issue. WARNING: Questions and answers posted on Avvo.com are viewable to the public and NOT protected by attorney client privilege.