POST
|
This is the Python script that I used to convert from the saved text/json to a shapefile. I never polished it up due to a lack of time. It should work as long as you change the path to the file name, the workspace and possibly the coordinate system. It would be very easy to convert from shp to sde if this portion works for you. Its not in .net so it may not be what you are looking for. I am trying to use the JsonToShp.py script but I am getting the following error: Traceback (most recent call last): File "C:\deleteme\JsonToShp.py", line 202, in <module> main() File "C:\deleteme\JsonToShp.py", line 52, in main createPoints(pntFc, ptFeats) File "C:\deleteme\JsonToShp.py", line 142, in createPoints feat.setValue(field[0:9], f[field]) File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\arcobjects.py", line 1007, in setValue return convertArcObjectToPythonObject(self._arc_object.SetValue(*gp_fixargs(args))) ValueError: Row: Invalid input value for SetValue Any idea? Thanks Jorge
... View more
12-04-2012
02:16 PM
|
0
|
0
|
392
|
POST
|
Did you create a widget to Export the Graphis as a FeatureClass? If so, could you share it? Thanks I am trying to upload a graphics layer to a gdb on our local server through a geoproc service.. 1.In flex, i make a new feature set from the graphics layer. I then build my parameters and execute the geoprocessing task. var myGL:GraphicsLayer = resultsList[resultLayerDataGrid.selectedIndex].graphicLayer;
var fs:FeatureSet = new FeatureSet(ArrayCollection(myGL.graphicProvider).toArray())
var params:Object =
{
"aFeatureSet": fs
};
gp.execute(params); 2. My service runs from the following script: import arcpy
from arcpy import env
userName = "mgiles"
env.workspace = "C:\\Users\\Administrator.GIS\\AppData\\Roaming\\ESRI\\Desktop10.0\\ArcCatalog\\" + userName + '.sde'
env.overwriteOutput = True
aFeatureSet = arcpy.GetParameter(0)
anOutput="output"
arcpy.CopyFeatures_management(aFeatureSet, anOutput) I have attached an image of the service from the rest services directory. The script works from desktop. When i run it from Flex it returns the error: [RPC Fault faultString="Error Executing Task. Error processing message" faultCode="500" faultDetail=""]. Could someone point me in the right direction as to what im doing wrong? Thanks. [ATTACH=CONFIG]16340[/ATTACH]
... View more
11-30-2012
01:14 PM
|
0
|
0
|
578
|
POST
|
Hello Robert, I would like to Export the graphics we draw with your eDraw 3.0 widget into shapefiles. o you know of any widget that can do that? If not, is there anyway I can convert the file exported as text from your widget into a shapefile? Any idea will be appreciated. Thanks Jorge
... View more
09-25-2012
02:37 PM
|
0
|
1
|
2510
|
POST
|
Jorge, As this widgets developer I would suggest that you pay close attention to my responses to your inquiry. In my last post I corrected some of the text in your expression. Go back to my last post and copy the expression as your had the order of the single qoutes and the percent symbol backwards. Ups Sorry Robert I guess I was overlooking and I didn't see your response. Thanks for the input though. Jorge
... View more
09-14-2012
02:28 PM
|
0
|
0
|
639
|
POST
|
I would guess that your PRJTRACTNO is actualy a number field and not a text field. If so: <expressions>
<expression alias="Property Parcels" textsearchlabel="Search by PRJTRACTNO AND OWNER">
<values>
<value prompt="Enter Project Number">PRJTRACTNO = [value]<value>
<value prompt="Enter Owner"> AND UPPER(OWNER) LIKE UPPER(%'[value]'%)</value>
</values>
</expression>
</expressions>
If I try to search a numeric field using text input, I get the same error that you posted. R_ Of course, as Robert pointed out, the double wildcards can/will match a LOT of values. Thanks so much for trying to help me with this issue. Unfortunately, I got the same error and none of my fields are numeric (see my search boxes in the attached file)). Any more ideas? This is how my code look now. <expressions> <expression alias="Property Parcels" textsearchlabel="Search by PRJTRACTNO AND OWNER"> <values> <value prompt="Enter Project Number">PRJTRACTNO = [value]</value> <value prompt="Enter Owner"> AND UPPER(OWNER) LIKE UPPER(%'[value]'%)</value> </values> </expression> </expressions> Thanks jorge
... View more
09-04-2012
02:46 PM
|
0
|
0
|
475
|
POST
|
do you mean something like the search centerline example from the example site (though it actually has three value statements) http://gis.calhouncounty.org/FlexViewer3.0/index.html?config=config-eSearch.xml&search=2&slayer=3&exprnum=1 ? If so, here is the snippet from the eSearchWidget.xml Robert has supplied with the widget that does that. <definitionexpression></definitionexpression>
<enableexport>true</enableexport>
<name>Road Centerlines</name>
<url>http://gislap134/ArcGIS/rest/services/Highway/MapServer/5</url>
<expressions>
<expression alias="Road Name and Zip" textsearchlabel="Search by Road Name and Left Zipcode and Right Zip:">
<values>
<value prompt="Exmaple: ANDREW">RD_NAME = '[value]'</value>
<value prompt="Exmaple: 36201"> AND ZIP_L = [value]</value>
<value prompt="Exmaple: 36201"> AND ZIP_R = [value]</value>
</values>
</expression>
</expressions> (I deleted the other expressions that didn't seem to apply) (Don't forget the space before the AND as it is not in the example.xml this way) Can also use OR instead if that is what you need. Is this what you are after? Below is a snippet that I am using. It puts two options on the search widget, one lets you put in partial and does a LIKE operation, the other only finds exact matches. But, they are both searching the same layer, same field. <expression alias="SiteCode" textsearchlabel="Search by SiteCode: (enter search text in one box only)">
<values>
<value prompt="Search for Matches: Example: 100-D-" field="SITECODE">UPPER(SITECODE) LIKE UPPER('%[value]%')</value>
</values>
<values>
<value prompt="Search EXACT SiteCode" field="SITECODE">UPPER(SITECODE) = UPPER('[value]')</value>
</values>
</expression> <expression alias="SiteCode" textsearchlabel="Search by SiteCode: (enter search text in one box only)">
<values>
<value prompt="Search for Matches: Example: 100-D-" field="SITECODE">UPPER(SITECODE) LIKE UPPER('%[value]%')</value>
</values>
<values>
<value prompt="Search EXACT SiteCode" field="SITECODE"> OR UPPER(SITECODE) = UPPER('[value]')</value>
</values>
</expression> In the first example, multiple fields are searched, in the second example, you choose which input to use and it searches the same fields but with different expression. The third is similar to the second but will take inputs from both text box's, and if either match, you get the results. Just remember, if you use an AND or OR statement, the first text box MUST have a value in it. If I understand you correctly, below is what you need.
<expression alias="Tract" textsearchlabel="Search by Tract Number:
<values>
<value prompt="Select All Records" userlist="Select All Records" field="PRJTRACTNO">1=1</value>
</values>
<values>
<value prompt="Search Tract Number" field="PRJTRACTNO">UPPER(PRJTRACTNO) LIKE UPPER(%'[value]'%)</value>
</values>
</expression> R_ Thanks so much. I am trying to implement the search with the AND using two fields. <expressions> <expression alias="Property Parcels" textsearchlabel="Search by PRJTRACTNO AND OWNER"> <values> <value prompt="Enter Project Number">UPPER(PRJTRACTNO) LIKE UPPER(%'[value]'%)</value> <value prompt="Enter Owner"> AND UPPER(OWNER) LIKE UPPER(%'[value]'%)</value> </values> </expression> </expressions> However I got the error which is showinfg in the attached image Thanks Jorge
... View more
08-31-2012
01:24 PM
|
0
|
0
|
475
|
POST
|
Never mind. I already found out how to do it. Thanks all. Could you please tell me how? Thanks Jorge
... View more
08-31-2012
10:50 AM
|
0
|
0
|
338
|
POST
|
hello Robert, Now i would like to use your eSearch tool with two value option using the same layer and fields. Is that possible? Something like this: <values> <value userlist="Select All Records">1=1</value> <value>upper(PRJTRACTNO) like upper('%[value]%')</value> </values> </expression> </expressions> <graphicalsearchlabel>Use one of the graphical search tools to select Property Parcels</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <titlefield>PRJTRACTNO</titlefield> <fields all="false"> <field name="PRJTRACTNO" gridfield="true"/> <field name="OWNER" gridfield="true"/> <field name="MOD_DATE" gridfield="true" dateformat="MM/DD/YYYY"/> <field name="CLASS" gridfield="true" gridfieldonly="true"/> <field name="ROW_IMPACT" gridfield="true" gridfieldonly="true"/> <field name="ADDITIONAL_IMPACT" gridfield="true" gridfieldonly="true"/>
... View more
08-30-2012
03:27 PM
|
0
|
0
|
399
|
POST
|
Jorge, Just the way you did it in the QueryWidget just use 1=1 in the expression for the eSearch. Sorry Robert but I don't know how to code 1=1 in the eSearch? In the Query was: <query>1=1</query> but in the eSearch the code <expression alias="Project Railroads" textsearchlabel="Enter NAME or FEATURE_ID below"> <values> <value>NAME like ('%[value]%') </value> </values> </expression> How can I replace 1=1 in this search expression? Thanks again Jorge
... View more
08-22-2012
01:56 PM
|
0
|
0
|
399
|
POST
|
Jorge, There is no way to completely hide the relates tab if you are using the fixed datagrid. There is the disablerelatestabinfixed attribute on the floatorfixed element as covered by the documentation. <floatorfixed disablerelatestabinfixed="true">fixed</floatorfixed> Hello robert thanks that did it. Now, is there any way to do a eSearch that will return all the values on a layer? I have a field named ProjectNumber. I would like to have all the Projects returned so later I can display them in the datagrid from where I can sort and access them? I am partially accomplishing this with the regular Query widget which allow me to query 1=1 to obtain all the records but I really would like to access them from the datagrid. Thanks Jorge
... View more
08-21-2012
10:39 AM
|
0
|
0
|
409
|
POST
|
Robert version 3.04 is working great for me but I am not planning on using the Relate feature for now. Is there anyway I can hide the Relate Results tab or at least don't show the Relate results label and the icon next to the label? Thanks Jorge
... View more
08-14-2012
02:11 PM
|
0
|
0
|
435
|
POST
|
Hello Robert, I know your Identify tool offers the option to exclude basemap but I would actually would like to exclude the State layer from the selection. The State layer is part of my mapservice and is included as an operational layer. Thanks in advance Jorge
... View more
08-14-2012
07:23 AM
|
0
|
0
|
285
|
POST
|
JORGE, The new 3.0.2 and 3.0.3 uses the new Spark Datagrid and it is worth a shot trying that version. The main difference between 2.5 and 3.0 versions of the viewer is that the 3.0 viewer uses the Adobe Fle SDK 4.6 where the 2.5 used the 4.1 SDK. Robert. I updated to 3.04 and the non-rectangular problem I had was fixed. I love the autohide option that respond to the cursor focus. The only issue I would like to correct if possible is that the SearResults Table title is being covered by the Coordinates (not big dealbut will be nice if I could move the dynamic coordinates or the minimized table to the right. Any suggestions? Thanks for the wonderfull jod you do. Jorge
... View more
08-10-2012
06:51 AM
|
0
|
0
|
426
|
POST
|
Robert, What puzzle me is that I had the same data (excat mapserver) working on my Flex 2.5) version. Thus, that make me believe the data is not the problem right? I have the Flex 2.5 and the Flex 3.0 versions of the same data running in my PC and only the Flex 3.0 is giving me the not rectangular datagrid table. Any ideas? Is there any tag in your new releases 3.01 or 3.03 that allows to turn the resize the datagrid off? Thanks so much Jorge
... View more
08-07-2012
01:54 PM
|
0
|
0
|
426
|
POST
|
Sorry Robert for misleading you but I delete many fields from the actual code to make it more readable. Below I include all the fields <graphicalsearchlabel>Use one of the graphical search tools to select Property Parcels</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <titlefield>TRACTNUM</titlefield> <fields all="false"> <field name="TRACTSOURC" gridfield="true" gridfieldonly="true"/> <field name="TRACTCODE" gridfield="true" gridfieldonly="true"/> <field name="TRACTNUM" gridfield="true"/> <field name="ASSOC_TR" gridfield="true" gridfieldonly="true"/> <field name="UFSID" gridfield="true" gridfieldonly="true"/> <field name="LONAME1" gridfield="true"/> <field name="LONAME2" gridfield="true" gridfieldonly="true"/> <field name="COUNTY" gridfield="true" gridfieldonly="true"/> <field name="STATE" gridfield="true" gridfieldonly="true"/> <field name="SECTION" gridfield="true" gridfieldonly="true"/> <field name="TOWNSHIP" gridfield="true" gridfieldonly="true"/> <field name="RANGE" gridfield="true" gridfieldonly="true"/> <field name="ABSTRACTNO" gridfield="true" gridfieldonly="true"/> <field name="SURVEYNAME" gridfield="true" gridfieldonly="true"/> <field name="LGLSOURCE" gridfield="true" gridfieldonly="true"/> <field name="LEGALDESC" gridfield="true" gridfieldonly="true"/> <field name="LNLIST_ACR" gridfield="true" gridfieldonly="true"/> <field name="LEGALACRES" gridfield="true" gridfieldonly="true"/> <field name="SHAPEACRES" gridfield="true" gridfieldonly="true"/> <field name="ONLINE" gridfield="true" gridfieldonly="true"/> <field name="ROUTE" gridfield="true" gridfieldonly="true"/> <field name="BEGINMP" gridfield="true" gridfieldonly="true"/> <field name="ENDMP" gridfield="true" gridfieldonly="true"/> <field name="BEGINSTA" gridfield="true" gridfieldonly="true"/> <field name="ENDSTA" gridfield="true" gridfieldonly="true"/> <field name="FOOTAGE" gridfield="true" gridfieldonly="true"/> <field name="PERM_ACRES" gridfield="true" gridfieldonly="true"/> <field name="TEMP_ACRES" gridfield="true" gridfieldonly="true"/> <field name="ETWS_ACRES" gridfield="true" gridfieldonly="true"/> <field name="TOTL_WS_AC" gridfield="true" gridfieldonly="true"/> <field name="SURVEYED" gridfield="true" gridfieldonly="true"/> <field name="MAPPER" gridfield="true" gridfieldonly="true"/> <field name="PLOTDATE" gridfield="true" gridfieldonly="true" dateformat="MM/DD/YYYY"/> <field name="LOADDATE" gridfield="true" gridfieldonly="true" dateformat="MM/DD/YYYY"/> <field name="MOCID" gridfield="true" gridfieldonly="true"/> <field name="MOCIDPREV" gridfield="true" gridfieldonly="true"/> <field name="SSPREVIOUS" gridfield="true" gridfieldonly="true"/> <field name="SSCURRENT" gridfield="true" gridfieldonly="true"/> <field name="SBPREVIOUS" gridfield="true" gridfieldonly="true"/> <field name="SBCURRENT" gridfield="true" gridfieldonly="true"/> <field name="DEL" gridfield="true" gridfieldonly="true"/> <field name="REV" gridfield="true" gridfieldonly="true"/> <field name="PS_PAGE" gridfield="true" gridfieldonly="true"/> <field name="ISSUE" gridfield="true" gridfieldonly="true"/> <field name="NOMSCALE" gridfield="true" gridfieldonly="true"/> <field name="STATUS" gridfield="true" gridfieldonly="true"/> <field name="GIS_DEL" gridfield="true" gridfieldonly="true"/> <field name="PLAT" gridfield="true" gridfieldonly="true"/> <field name="CLOSED" gridfield="true" gridfieldonly="true"/> <field name="PLAT_REV" gridfield="true" gridfieldonly="true"/> <field name="TRO" gridfield="true" gridfieldonly="true"/> <field name="WK_PROJ" gridfield="true" gridfieldonly="true"/> <field name="TITLE" gridfield="true" gridfieldonly="true"/> <field name="CRNS" gridfield="true" gridfieldonly="true"/> <field name="MISC" gridfield="true" gridfieldonly="true"/> <field name="GIS_NOTES" gridfield="true" gridfieldonly="true"/> <field name="TIM_DEL" gridfield="true" gridfieldonly="true"/> <field name="TIM_REV" gridfield="true" gridfieldonly="true"/> <field name="TIM_CO" gridfield="true" gridfieldonly="true"/> <field name="SMAP_NAME" gridfield="true" gridfieldonly="true"/> <field name="SMAP_NUM" gridfield="true" gridfieldonly="true"/> <field name="SMAP_SCALE" gridfield="true" gridfieldonly="true"/> <field name="SMAP_ANGLE" gridfield="true" gridfieldonly="true"/> <field name="DWG_DATE" gridfield="true" gridfieldonly="true" dateformat="MM/DD/YYYY"/> <field name="DWG_NUM" gridfield="true" gridfieldonly="true"/> <field name="DWN_BY" gridfield="true" gridfieldonly="true"/> <field name="APPR_BY" gridfield="true" gridfieldonly="true"/> <field name="CE_HYPERLI" gridfield="true" gridfieldonly="true"/> <field name="PLAT_HYPER" gridfield="true" gridfieldonly="true"/> <field name="SURV_CL" gridfield="true" gridfieldonly="true"/> <field name="TYPE" gridfield="true" gridfieldonly="true"/> <field name="NAME_DEED" gridfield="true" gridfieldonly="true"/> <field name="SB_ONLINE" gridfield="true" gridfieldonly="true"/> <field name="MILEAGE" gridfield="true" gridfieldonly="true"/> <field name="Spread" gridfield="true" gridfieldonly="true"/> <field name="ASSOC_CNT" gridfield="true" gridfieldonly="true"/> <field name="PROP_DIST" gridfield="true" gridfieldonly="true"/> <field name="RPLS" gridfield="true" gridfieldonly="true"/> <field name="REVISION" gridfield="true" gridfieldonly="true"/> <field name="VOL_PAGE" gridfield="true" gridfieldonly="true"/> <field name="PLAT_PRI" gridfield="true" gridfieldonly="true"/> <field name="UFS_NAME1" gridfield="true" gridfieldonly="true"/> <field name="UFS_NAME2" gridfield="true" gridfieldonly="true"/> <field name="ENTRY_F" gridfield="true" gridfieldonly="true"/> <field name="ENTRY_T" gridfield="true" gridfieldonly="true"/> <field name="ENTRY" gridfield="true" gridfieldonly="true"/> <field name="EXIT_F" gridfield="true" gridfieldonly="true"/> <field name="EXIT_T" gridfield="true" gridfieldonly="true"/> <field name="EXIT" gridfield="true" gridfieldonly="true"/> <field name="CUR_DATE" gridfield="true" gridfieldonly="true" dateformat="MM/DD/YYYY"/> </fields> <links/> <zoomscale usegeometry="true" zoompercent="15"></zoomscale> </layer>
... View more
08-01-2012
02:48 PM
|
0
|
0
|
427
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|