<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Project shape file to a custom projection that does not exist in EPSG in Map Projections Questions</title>
    <link>https://community.esri.com/t5/map-projections-questions/project-shape-file-to-a-custom-projection-that/m-p/1327537#M360</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am facing issues with projections when I try to match custom projections with EPSG projections from ArcMap.&lt;/P&gt;&lt;P&gt;I have a xarray.Dataset in python with the following coordinate system:&amp;nbsp;&lt;/P&gt;&lt;P&gt;'+proj=lcc +units=m +a=6370000.0 +b=6370000.0 +lat_1=30.0 +lat_2=60.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +k_0=1.0 +nadgrids=@null +wktext +no_defs'&lt;/P&gt;&lt;P&gt;When I try to get in python the equivalence of that projection to EPSG there is not equivalence. What I know it is that the closest projection in ArcMap to that one is North_America_Lambert_Conformal_Conic.&lt;/P&gt;&lt;P&gt;I need to extract the data of that xarray.Dataset to the boundary of a basin that I have in North_America_Lambert_Conformal_Conic.&lt;/P&gt;&lt;P&gt;I have extracted a subset of the xarray.Dataset to a raster and this is how it looks. As you can see there are watersheds inside the great lakes. Both raster and shapefile are not in the same coordinate system&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SaraAV_0-1694474711619.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80384i0D21482C401E5BE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SaraAV_0-1694474711619.png" alt="SaraAV_0-1694474711619.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I try to put the shape file into the same custom coordinate system of the xarray.Dataset with the following code in python, but with no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proj4_string = '+proj=lcc +units=m +a=6370000.0 +b=6370000.0 +lat_1=30.0 +lat_2=60.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +k_0=1.0 +nadgrids=@null +wktext +no_defs'&lt;/P&gt;&lt;P&gt;target_crs = pyproj.CRS.from_proj4(proj4_string)&lt;/P&gt;&lt;P&gt;shapefile_path = 'basins_Lambert_conformal_conic.shp'&lt;/P&gt;&lt;P&gt;basins = gpd.read_file(shapefile_path)&lt;/P&gt;&lt;P&gt;projected_basin = basins.to_crs(target_crs)&lt;/P&gt;&lt;P&gt;snow=ldasout['QSNOW'] #ldasout is the&amp;nbsp;xarray.Dataset&amp;nbsp;&lt;/P&gt;&lt;P&gt;snow=snow.rio.write_crs(target_crs)&lt;/P&gt;&lt;P&gt;snow1=snow.rio.clip(projected_basin.iloc[[5]].geometry)&lt;/P&gt;&lt;P&gt;When I run the last line of code I got the following error. Any idea about how to solve it?&lt;/P&gt;&lt;PRE&gt;ERROR 1: PROJ: internal_proj_identify: Transformation cannot be formatted as WKT1 TOWGS84 parameters&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how can i get the shape file into the custom projection of the xarray?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2023 23:32:42 GMT</pubDate>
    <dc:creator>SaraAV</dc:creator>
    <dc:date>2023-09-11T23:32:42Z</dc:date>
    <item>
      <title>Project shape file to a custom projection that does not exist in EPSG</title>
      <link>https://community.esri.com/t5/map-projections-questions/project-shape-file-to-a-custom-projection-that/m-p/1327537#M360</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am facing issues with projections when I try to match custom projections with EPSG projections from ArcMap.&lt;/P&gt;&lt;P&gt;I have a xarray.Dataset in python with the following coordinate system:&amp;nbsp;&lt;/P&gt;&lt;P&gt;'+proj=lcc +units=m +a=6370000.0 +b=6370000.0 +lat_1=30.0 +lat_2=60.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +k_0=1.0 +nadgrids=@null +wktext +no_defs'&lt;/P&gt;&lt;P&gt;When I try to get in python the equivalence of that projection to EPSG there is not equivalence. What I know it is that the closest projection in ArcMap to that one is North_America_Lambert_Conformal_Conic.&lt;/P&gt;&lt;P&gt;I need to extract the data of that xarray.Dataset to the boundary of a basin that I have in North_America_Lambert_Conformal_Conic.&lt;/P&gt;&lt;P&gt;I have extracted a subset of the xarray.Dataset to a raster and this is how it looks. As you can see there are watersheds inside the great lakes. Both raster and shapefile are not in the same coordinate system&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SaraAV_0-1694474711619.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80384i0D21482C401E5BE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SaraAV_0-1694474711619.png" alt="SaraAV_0-1694474711619.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I try to put the shape file into the same custom coordinate system of the xarray.Dataset with the following code in python, but with no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proj4_string = '+proj=lcc +units=m +a=6370000.0 +b=6370000.0 +lat_1=30.0 +lat_2=60.0 +lat_0=40.0 +lon_0=-97.0 +x_0=0 +y_0=0 +k_0=1.0 +nadgrids=@null +wktext +no_defs'&lt;/P&gt;&lt;P&gt;target_crs = pyproj.CRS.from_proj4(proj4_string)&lt;/P&gt;&lt;P&gt;shapefile_path = 'basins_Lambert_conformal_conic.shp'&lt;/P&gt;&lt;P&gt;basins = gpd.read_file(shapefile_path)&lt;/P&gt;&lt;P&gt;projected_basin = basins.to_crs(target_crs)&lt;/P&gt;&lt;P&gt;snow=ldasout['QSNOW'] #ldasout is the&amp;nbsp;xarray.Dataset&amp;nbsp;&lt;/P&gt;&lt;P&gt;snow=snow.rio.write_crs(target_crs)&lt;/P&gt;&lt;P&gt;snow1=snow.rio.clip(projected_basin.iloc[[5]].geometry)&lt;/P&gt;&lt;P&gt;When I run the last line of code I got the following error. Any idea about how to solve it?&lt;/P&gt;&lt;PRE&gt;ERROR 1: PROJ: internal_proj_identify: Transformation cannot be formatted as WKT1 TOWGS84 parameters&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how can i get the shape file into the custom projection of the xarray?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 23:32:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/map-projections-questions/project-shape-file-to-a-custom-projection-that/m-p/1327537#M360</guid>
      <dc:creator>SaraAV</dc:creator>
      <dc:date>2023-09-11T23:32:42Z</dc:date>
    </item>
  </channel>
</rss>

