The striatum is organized into two major outputs formed by striatal projection neuron (SPN) subtypes with distinct molecular identities. In addition, the histochemical division into patch and matrix compartments represents an additional spatial organization, proposed to mirror a functional specialization in a motor-motivation dimension. To map the molecular diversity of SPNs in the context of the patch and matrix division, we genetically labeled mu-opioid receptor (Oprm1) expressing striatal neurons and performed single-nucleus RNA sequencing (snRNA-seq). This allowed us to establish new molecular definitions of the patch-matrix compartments, resulting in a molecular code for mapping patch SPNs at the cellular level. In addition, Oprm1 expression labeled exopatch SPNs, which we found to be molecularly distinct from both patch as well as neighboring matrix SPNs, thereby forming a separate molecular entity. At the cell-type level, we found an unexpected SPN diversity, leading to the identification of a new Col11a1+ striatonigral SPN type. At the tissue level, we found that mapping the spatial expression of a number of markers revealed new definitions of spatial domains in the striatum, which were conserved in the non-human primate brain. Interestingly, the spatial markers were cell-type independent and instead represented a spatial code that was found across all SPNs within a spatially restricted domain. This spatiomolecular map establishes a formal system for targeting and studying the striatal subregions and SPNs subtypes, beyond the classical striatonigral and striatopallidal division.