The gain on sale of land will be capital gain and the loss on disposition of rental real estate will be ordinary loss. You will be able to offset the loss against the gain from sale of land.
Let me know if you have any question.
Please note: This advice is provided with the understanding that all the relevant facts have been provided by you. Any change in facts might affect the advice given and hence may not be relied on in such cases. Nothing contained in this reply was intended or written to be used, can be used by any taxpayer, or may be relied upon or used by any taxpayer for the purposes of avoiding penalties that may be imposed on the taxpayer under the Internal Revenue Code of 1986, as amended.
Link to publication that states - gain on sale of investment property is capital gain.
And regarding loss on sale of rental property- this will be a Sec 1250 property and loss on sale of sec 1250 property will be part of Sec 1231 gains and losses. Sec 1231 losses are ordinary.