<?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 Re: Need to do spatial query when using Export Map operation in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/need-to-do-spatial-query-when-using-export-map/m-p/43804#M190</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I found that "layerDefs" on export map operation do accept spatial sql function to perform spatial query, such like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;layerDefs = "0:sde.st_within (shape, sde.st_geometry ('polygon ((13033822 4374104, 13124324 4374104, 13124324 4438923, 13033822 4438923,13033822 4374104))', 3857)) = 't'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The same to Query Definition tab on layer properties dialog in ArcMap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Apr 2013 04:20:49 GMT</pubDate>
    <dc:creator>wangzhifang</dc:creator>
    <dc:date>2013-04-25T04:20:49Z</dc:date>
    <item>
      <title>Need to do spatial query when using Export Map operation</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/need-to-do-spatial-query-when-using-export-map/m-p/43803#M189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a need to do spatial query and attributed query when using export map operation on a map service resource. However, there is only "layerDefs" parameter on export operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;While my map service only contains a point layer, so now I have a workround that do a spatial query(including where clause) on the point layer resource using query operation and fetch only lots of objectIDs, then push these result IDs to layerDefs of export, such as &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"layerDefs=0:objectids in (1,2,3...9999,10000,....15000,....)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works but, as you see, the spatial query result may have more than 10 thousands IDs, and do such query only in database would be time consumed...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I wonder is there any other ways to do my job? Or why not export map operation add a "geometry" parameter as query operation do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 01:57:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/need-to-do-spatial-query-when-using-export-map/m-p/43803#M189</guid>
      <dc:creator>wangzhifang</dc:creator>
      <dc:date>2013-04-25T01:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need to do spatial query when using Export Map operation</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/need-to-do-spatial-query-when-using-export-map/m-p/43804#M190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I found that "layerDefs" on export map operation do accept spatial sql function to perform spatial query, such like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;layerDefs = "0:sde.st_within (shape, sde.st_geometry ('polygon ((13033822 4374104, 13124324 4374104, 13124324 4438923, 13033822 4438923,13033822 4374104))', 3857)) = 't'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The same to Query Definition tab on layer properties dialog in ArcMap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 04:20:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/need-to-do-spatial-query-when-using-export-map/m-p/43804#M190</guid>
      <dc:creator>wangzhifang</dc:creator>
      <dc:date>2013-04-25T04:20:49Z</dc:date>
    </item>
  </channel>
</rss>

