Get WKT if you have WKID

5594
6
Jump to solution
03-09-2015 07:17 AM
TimWitt2
MVP Alum

Hey everybody,

I was wondering if it is possible to get the WKT if you have a WKID.

I know that it is possible to create a new SpatialReference | API Reference | ArcGIS API for JavaScript    if you know either the WKT or WKID, but is it possible to retrieve a WKT if your spatial reference was created via a WKID?

Thanks,

Tim

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Tim,

   My past experience on this is NO you can not. If you are working on WAB there is a folder client\stemapp\jimu.js\SpatialReference that has util.js and a getCSStr function that will give you a WKT string for a WKID

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Emeritus

Tim,

   My past experience on this is NO you can not. If you are working on WAB there is a folder client\stemapp\jimu.js\SpatialReference that has util.js and a getCSStr function that will give you a WKT string for a WKID

TimWitt2
MVP Alum

Robert,

yes this is where I am working in. In my widget I want to get that text via a wkid.

Do you have any code snipped that would do that? I don't think my skills are quiet at that level yet, to access util.js

Thanks!

Tim

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tim,

   Sorry I was doing some traveling today and did not see your question. Based on your other thread it looks like you have this figured out though.

0 Kudos
TimWitt2
MVP Alum

Yes, you showed me the right path! Thanks!

0 Kudos
ChrisSergent
Regular Contributor III

If there were a way to download this table, you could probably run a query to get the value that you want: ArcGIS REST API  That was projected and here is the table for geographic: ArcGIS REST API

0 Kudos
JeffJacobson
Occasional Contributor III

You can use epsg.io to look up WKTs for a given WKID.

E.g. http://epsg.io/4326.wkt

0 Kudos